[Python-checkins] cpython: Minor clean-ups. (original) (raw)
raymond.hettinger python-checkins at python.org
Wed Mar 23 22:38:48 CET 2011
- Previous message: [Python-checkins] peps: Ignore pyc files
- Next message: [Python-checkins] r88796 - in sandbox/trunk/pep362: pep362.py setup.py test_pep362.py tests
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
http://hg.python.org/cpython/rev/59127dcefd87 changeset: 68882:59127dcefd87 user: Raymond Hettinger <python at rcn.com> date: Wed Mar 23 14:38:39 2011 -0700 summary: Minor clean-ups.
files: Lib/collections/init.py | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Lib/collections/init.py b/Lib/collections/init.py --- a/Lib/collections/init.py +++ b/Lib/collections/init.py @@ -321,7 +321,9 @@ for index, name in enumerate(field_names): if (not all(c.isalnum() or c=='_' for c in name) or _iskeyword(name)
or not name or name[0].isdigit() or name.startswith('_')
or not name
or name[0].isdigit()
or name.startswith('_') or name in seen): field_names[index] = '_%d' % index seen.add(name)
@@ -351,8 +353,7 @@ for index, name in enumerate(field_names)) )
Execute the class definition string in a temporary namespace and
support tracing utilities by setting a value for frame.f_globals['name']
namespace = {} try: exec(class_definition, namespace) Execute the class definition string in a temporary namespace
-- Repository URL: http://hg.python.org/cpython
- Previous message: [Python-checkins] peps: Ignore pyc files
- Next message: [Python-checkins] r88796 - in sandbox/trunk/pep362: pep362.py setup.py test_pep362.py tests
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]