module with __call__ defined is not callable?
Steve Holden
steve at holdenweb.com
Wed Feb 8 16:02:27 EST 2006
Antoon Pardon wrote:
> Op 2006-02-08, Steve Holden schreef <steve at holdenweb.com>:
>
>>Why should a module be callable? What's the advantage? Should we be able
>>to add two modules together, yielding a module that contains all the
>>code of both modules? What happens if I multiply a module by two -
>>presumably the result should be the same as adding a module to itself?
>>Perhaps we should be able to divide a module by a function?
>>
>>The pursuit of orthogonality, while admirable, can lead to insanity if
>>pushed too far.
>
>
> This is not an argument. This doesn't give a clue about where to stop
> this pursuit en when to go on.
>
Well, let's say we should stop short of unsane behavior. That's a phrase
you should understand.
> Whether it is usefull to call modules add them or multiply them by two
> is up to the person producing the code. That is no different than when
> he decides it is usefull to call certain objects, add them or multiply
> them by two.
>
> I can understand there are implemenation details that make it not
> worth while to implement this. But otherwise I would think it
> a bad reason to give up orthogonality just because one can't imagine
> what it could be usefull for.
>
Fine. Off you go, then.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
More information about the Python-list
mailing list