
June 2, 2000
11:10 p.m.
Would it be too much trouble to prevent replacing double-underscore attributes like __name__ and __file__? I'll accept a "consenting adults" argument -- it's just that somehow this makes me uneasy: Python 1.5.2 (#54, Jul 14 1999, 12:50:51) [C] on irix6 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> import foo >>> foo.__name__ 'bar' >>> foo.__file__ 'bar.py' >>> foo <module 'bar' from 'bar.py'> Of course, there is no 'bar.py'. 'foo.py' just contains __file__ = 'bar.py' __name__ = 'bar' (If you say i deserved to be punished for such heresy, fine...) -- ?!ng