[Python-Dev] PEP 329: Treating Builtins as Constants in the Standard Library (original) (raw)
Michael Hudson mwh at python.net
Tue Apr 20 06:59:28 EDT 2004
- Previous message: [Python-Dev] PEP 329: Treating Builtins as Constants in the Standard Library
- Next message: [Python-Dev] dict.sortedkeys()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Phillip J. Eby" <pje at telecommunity.com> writes:
At 09:55 AM 4/19/04 -0400, Raymond Hettinger wrote:
> I'm not sure I understand the reasoning for implementing this via a > bytecode hack, rather than in the compiler or loading mechanisms.
The reason is that it is not always possible to know (in general) what things constants. Take a look at the ASPN recipe example, it ought to clarify for you how this works. I don't need clarification about the mechanism; I independently implemented exactly this hack myself a couple of years ago. (I just didn't propose it become part of standard Python.) See 'bindfunc()' in: http://cvs.eby-sarna.com/PEAK/src/peak/util/Code.py?rev=1.1.2.1&content-type=text/vnd.viewcvs-markup
Here was me thinking I was the only one nuts enough to implement the bytecodehacks, and I find everyone's at it!
Cheers, mwh
-- Academic politics is the most vicious and bitter form of politics, because the stakes are so low. -- Wallace Sayre
- Previous message: [Python-Dev] PEP 329: Treating Builtins as Constants in the Standard Library
- Next message: [Python-Dev] dict.sortedkeys()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]