Lie Ryan <lie.1...@gmail.com> dixit:

> > - functions should return one value (im not 100% of this one)  
> 
> I 100% disagree or with this one.

Could you explain this bit, Lie? I'm very interested.
I use multiple-value result myself, for it's so practicle in given cases. But 
it makes me uneasy; also have the impression (why?) it reveals wrong design.

About the same feeling as when I need a function both to have an effect (eg 
assignment outside the func scope) and return a value. I call this "action vs 
question" ; it more or less matches Bertrand Meyer's "Command-Query Separation 
Principle" (Eiffel) & Pascal "procedure vs function".
In the latter case I'm 99% sure the design smells but sometines I cannot find 
proper code reorganisation.

Denis
________________________________

la vita e estrany

http://spir.wikidot.com/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to