Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Side by Side Diff: packages/infra_libs/infra_libs/infra_types/infra_types.py

Issue 2179853002: Added packages/infra_libs as the first Python package. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Final rebase (no actual changes) Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import collections 5 import collections
6 import operator 6 import operator
7 7
8 8
9 def freeze(obj): 9 def freeze(obj):
10 """Takes a generic object ``obj``, and returns an immutable version of it. 10 """Takes a generic object ``obj``, and returns an immutable version of it.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 return len(self._d) 74 return len(self._d)
75 75
76 def __getitem__(self, key): 76 def __getitem__(self, key):
77 return self._d[key] 77 return self._d[key]
78 78
79 def __hash__(self): 79 def __hash__(self):
80 return self._hash 80 return self._hash
81 81
82 def __repr__(self): 82 def __repr__(self):
83 return 'FrozenDict(%r)' % (self._d.items(),) 83 return 'FrozenDict(%r)' % (self._d.items(),)
OLDNEW
« no previous file with comments | « packages/infra_libs/infra_libs/infra_types/__init__.py ('k') | packages/infra_libs/infra_libs/infra_types/test/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698