On Fri, May 04, 2001 at 02:57:09PM -0400, Barry A. Warsaw wrote: > >>>>> "JE" == Jeff Epler <jepler@inetnebr.com> writes: > | Why not let us spell this as: > | class X(Y): > | from Y import foo as _sfoo, bar as _sbar > | ... > NS> This already has a meaning in Python. Paul's suggested syntax > NS> is pretty neat, IMHO. > Not if Y is a class though, right? That would currently raise an > ImportError, ... Nope: >>> class string: ... pass ... >>> from string import split >>> string <class __main__.string at 8072e90> >>> That could be considered a misfeature for more than one reason (like importing from non-module objects, which you now do by inserting the object into sys.modules) but can't be fixed without breaking backward compatibility, except by inventing new syntax. -- Thomas Wouters <thomas@xs4all.net> Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4