Re: [Python-Dev] Conditional For Statements

2008-05-18 Thread Eli Courtwright
First, the best list on which to discuss this would be Python-Ideas not Python-Dev. Second, this was brought up there a few months ago, although not much discussion ensued: http://mail.python.org/pipermail/python-ideas/2008-March/001407.html - Eli On Sun, May 18, 2008 at 9:45 PM, Ryan Hitchman

Re: [Python-Dev] Backport PEP 3129: Class Decorators

2008-01-08 Thread Eli Courtwright
Since we're talking about class decorators, I have a question about function and instancemethod objects. The following code works class Root(object): def index(self): return Hello World! index.exposed = True but this code class Root(object): def index(self): return Hello

Re: [Python-Dev] Backport PEP 3129: Class Decorators

2008-01-08 Thread Eli Courtwright
Christian, Thanks for the example; I'm sorry that I didn't read the docs carefully enough to realize that I could extract the original function and set the attribute on that. - Eli On Jan 8, 2008 11:49 AM, Christian Heimes [EMAIL PROTECTED] wrote: The example should shed some light on the

[Python-Dev] possible string formatting bug

2007-10-08 Thread Eli Courtwright
Greetings, I've found what might be a bug in Python's % string formatting operator. Consider the following code: %%(%s)=%%s % hello On Python 2.5.1 (r251:54863, May 18 2007, 16:56:43) [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin this produces the string %(hello)s=%s which

Re: [Python-Dev] possible string formatting bug

2007-10-08 Thread Eli Courtwright
Thanks for the quick responses. Embarrassingly, this problem turned out to be a typo on my part. I visually double-and-triple-checked my code before posting to this list, but I still didn't notice the typo. Sorry to send everyone on a wild goose chase. - Eli