Re: Namespace hack

2012-06-05 Thread Daniel Fetchinson
>> Funny, you got to the last line of "import this" but apparently >> skipped the second line: >> >> Explicit is better than implicit. >> >> And you didn't even post your message on April 1 so no, I can't laugh >> even though I'd like to. > > Can you be less condescending? Of course! :) Anyway, t

Re: Namespace hack

2012-05-25 Thread Devin Jeanpierre
On Thu, May 24, 2012 at 9:04 AM, Daniel Fetchinson wrote: > Funny, you got to the last line of "import this" but apparently > skipped the second line: > > Explicit is better than implicit. > > And you didn't even post your message on April 1 so no, I can't laugh > even though I'd like to. Can you

Re: Namespace hack

2012-05-24 Thread Chris Angelico
On Fri, May 25, 2012 at 1:02 PM, Temia Eszteri wrote: > But then we've got "Simple is better than complex", and "Complex is > better than complicated". Of course if we decided to start iterating > through the zen of Python's verses and continually modifying the > example code to fit, it would get

Re: Namespace hack

2012-05-24 Thread Temia Eszteri
[Default] On 25 May 2012 02:47:11 GMT, Steven D'Aprano wrote: >Do you object to the ability to write standard Python modules? > ># module.py >def spam(obj, n): >return len(obj) + n > >def ham(obj): >return spam(obj, 23) > > >By your apparent misunderstanding of the Zen, you think that thi

Re: Namespace hack

2012-05-24 Thread Steven D'Aprano
Pardon me for breaking threading, but Daniel's response is not available on my ISP's news server, and I only discovered it by accident. On Thu May 24 15:04:34 CEST 2012, Daniel Fetchinson wrote: > > On Thu, 24 May 2012 08:50:59 +, Steven D'Aprano wrote: > > From the Zen of Python ("import t

Re: Namespace hack

2012-05-24 Thread Daniel Fetchinson
> >From the Zen of Python ("import this"): > > Namespaces are one honking great idea -- let's do more of those! > > > Inspired by this, I have a decorator that abuses function closures to > create a namespace type with the following properties: > > - all methods are static methods that do not take