Stefan Arentz a écrit :
> Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
> 
> ...
> 
>> The problem with Java is that it makes it very painfull to bridge two
>> APIs together, while Python usually makes it a breeze (easy
>> delegation, no dumb-ass psycho-rigid type system). So Java's solution
>> (hyper-formalization) isn't necessary here.
> 
> Interesting. I find Java much more predictable with APIs than Python
> actually.

I'm not going to debate on this because it's absolutely not what I'm 
talking about. My point is that Python has:

- duck typing, so you don't need one class subclassing another just to 
satisfy the compiler - as long as the object you send respects the 
expected protocol, everything's ok

- good support for delegation (via the __getattr__/__setattr__ magic 
methods), so you don't have to go thru the pain of hand-writing all the 
delegate methods - only the ones for which there's more to be done than 
straightforward delegation.


> Java has pretty strict rules for style and API design,

Java has pretty strict rules for almost anything.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to