Re: 'super' object has no attribute '__setitem__'

2011-08-19 Thread Paul Woolcock
If you really want __setitem__ and not __setattr__, you should change the base class to 'dict'. Or 'import UserDict' and use that for the base class. On Aug 18, 2011 9:45 PM, luvspython srehtva...@gmail.com wrote: I'm using Python 2.7 and the code below fails at the 'super' statement in the

Re: allow line break at operators

2011-08-15 Thread Paul Woolcock
On Aug 14, 2011 3:24 PM, Seebs usenet-nos...@seebs.net wrote: ... I'm not impressed by arguments based on but if I do something stupid, like select text with my eyes closed and reindent it without looking, I expect the compiler to save my bacon. In my opinion, it's not the compiler's job

Re: __all__

2011-08-09 Thread Paul Woolcock
The gurus will have to correct me if this is not an accepted practice, but I know some projects (Fabric is the one that comes to mind) will define a submodule specifically for the 'from blah import *' situation. The submodule would be called api, or something like that, so you can do: 'from

Re: Return and set

2011-07-19 Thread Paul Woolcock
= None return t # ... Is there a way to trim the 'if' block to reset self.tok upon return? -- Bill -- http://mail.python.org/**mailman/listinfo/python-listhttp://mail.python.org/mailman/listinfo/python-list -- Paul Woolcock pwool...@gmail.com -- http://mail.python.org/mailman

Re: Partial Function Application -- Advantages over normal function?

2011-07-18 Thread Paul Woolcock
`, that takes one parameter: add2(4) 6 --- Paul Woolcock pwool...@gmail.com On Mon, Jul 18, 2011 at 6:13 AM, Kurian Thayil kurianmtha...@gmail.com wrote: Hi, I am a newbie in python and would like to learn GUI programming. I would like to know what exactly is Partial Function

Re: Tips/lessons learned for writing a Python powered DSL?

2011-07-07 Thread Paul Woolcock
about them. Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list -- --- Paul Woolcock -- http://mail.python.org/mailman/listinfo/python-list