Re: [Python-Dev] Wrapping up 'dynamic attribute' discussion

2007-02-15 Thread Greg Falcon
On 2/15/07, Anthony Baxter <[EMAIL PROTECTED]> wrote: > On Friday 16 February 2007 09:08, Ben North wrote: > > The wrapper class idea was left > > open as a possibility for a future PEP. > > A good first step would be to contribute something like this to the > Python Cookbook, if it isn't already t

Re: [Python-Dev] Summary of "dynamic attribute access" discussion

2007-02-13 Thread Greg Falcon
On 2/13/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Anthony Baxter schrieb: > >> and the "wrapper class" idea of Nick Coghlan: > >>attrview(obj)[foo] > > > > This also appeals - partly because it's not magic syntax > > It's so easy people can include in their code for backwards > compat

[Python-Dev] PEP-343 - Context Managment variant

2005-08-08 Thread falcon
I know I came after the battle. And I have just another sight on context managment. Simple Context Managment may look in Python 2.4.1 like this: Synhronized example: def Synhronised(lock,func): lock.acquire() try: func() finally: lock.rele

[Python-Dev] __autoinit__ (Was: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code)

2005-08-02 Thread falcon
Hello python-list, As I Understood, semantic may be next: def qwerty(a,a.i,b,b.i,f.j): pass Would work like: def qwerty(anonymous1,anonymous2,anonymous3,anonymous4,anonymous5): (a,a.i,b,b.i,f.j)=(anonymous1,anonymous2,anonymous3,anonymous4,anonymous5) del anonymous1