[Python-Dev] [Python-checkins] peps: PEP 422 rewrite to present an idea that a) isn't crazy and b) it turns out (original) (raw)
PJ Eby pje at telecommunity.com
Thu Jun 7 00:57:01 CEST 2012
- Previous message: [Python-Dev] [Python-checkins] peps: PEP 422 rewrite to present an idea that a) isn't crazy and b) it turns out
- Next message: [Python-Dev] next alpha sequence value from var pointing to array
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Jun 6, 2012 at 6:07 PM, Eric Snow <ericsnowcurrently at gmail.com>wrote:
On Wed, Jun 6, 2012 at 5:40 AM, nick.coghlan <python-checkins at python.org> wrote: > + > +Alternatives > +============ > +
Would it be worth also (briefly) rehashing why the class instance couldn't be created before the class body is executed*? It might seem like a viable alternative if you haven't looked at how classes get created.
Backwards compatibility is really the only reason. So it'll have to wait till Python 4000. ;-)
(Still, that approach is in some ways actually better than the current approach: you don't need a prepare, for example. Actually, if one were designing a class creation protocol from scratch today, it would probably be simplest to borrow the enter/exit protocol, with enter() returning the namespace to be used for the suite body, and exit() returning a finished class... or something similar. Python-ideas stuff, to be sure, but it could likely be made a whole lot simpler than the current multitude of hooks, counter-hooks, and extended hooks.) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120606/58322741/attachment.html>
- Previous message: [Python-Dev] [Python-checkins] peps: PEP 422 rewrite to present an idea that a) isn't crazy and b) it turns out
- Next message: [Python-Dev] next alpha sequence value from var pointing to array
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]