Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function defaultdict(default) {
- this._default = default;
- };
- defaultdict.prototype = {
- get: function(key) {
- if (!key in this) { this[key] = this._default(key); }
- return this[key];
- }
- }
- addrs = defaultdict(function() {
- return defaultdict(function() {
- return defaultdict(function() {
- return [];
- });
- });
- });
- addrs.get(ip[0]).get(ip[1]).get(ip[2]).push(text);
Add Comment
Please, Sign In to add comment