On Thu, May 03, 2001 at 12:05:37PM -0700, Neil Schemenauer wrote: > Jeff Epler wrote: > > On Thu, May 03, 2001 at 09:24:40AM -0700, Paul F. Dubois wrote: > > > class X (Y rename foo as _sfoo, > > > bar as _sbar > > > ): > > > > Why not let us spell this as: > > class X(Y): > > from Y import foo as _sfoo, bar as _sbar > > ... > > This already has a meaning in Python. Paul's suggested syntax is > pretty neat, IMHO. Ditto but how to you separate the "rename" lists for multiple inheritance? class X (Y rename foo as _sfoo, bar as _sbar; Z): pass ^---- what to use here How about: class X(Y, Z): from Y inherit foo as _yfoo, bar as _ybar from Z inherit foo as _zfoo, bar as _zbar Hmmmmm. Don't know if I like that either. Just throwing out ideas. Trent -- Trent Mick TrentM@ActiveState.com
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