[Python-Dev] Update PEP 292 (original) (raw)
Raymond Hettinger python at rcn.com
Fri Aug 20 01:39:16 CEST 2004
- Previous message: [Python-Dev] Update PEP 292
- Next message: [Python-Dev] Update PEP 292
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Since few people have commented either way, and taking myself out of the picture, it comes down to a battle royale between you and Brett. :)
Hmm. Brett is taller. I'm better looking. He's almost a master of computer science. I'm just old. He's needs a summer job to eat. I've got a retirement account.
Perhaps, I can win him over through guile:
Call up IDLE, then press File, Open Module, string. Look at the source. Now, install your package and try again. No source.
Run "cvs ann string.py" or "cvs log string.py" and look at who did what and when. Now, install the package and try again. No history.
Look at the new string docs, decide that you want to subclass string.Template and want to look at the existing pattern. Time how long it takes you to find the source (change to the string subdirectory, look in init.py, learn the template.py is the real source, yada yada yada).
> To test the existing sandbox code, I moved it into the library and found > a circular import issue: importing the string package, causes > template.py to be imported, which in turn imports re which uses > sreparse.py, needs to import string. So, the whole thing fails.
Something's wacky with either your, or my setup then: Python 2.4a2 (#1, Aug 18 2004, 00:08:12) [GCC 3.3.3 20040412 (Gentoo Linux 3.3.3-r6, ssp-3.3.2-2, pie-8.7.6)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from string import Template [25426 refs] I'd like to know if anybody else has tried to wedge the sandbox implementation into their Python tree, and whether it worked or not. If you do, don't forget to remove your old string.py and string.pyc files.
How could this work? Template has an re.compile that runs upon import. The sre_parse module has an "import string" that runs when imported.
Raymond
- Previous message: [Python-Dev] Update PEP 292
- Next message: [Python-Dev] Update PEP 292
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]