No Do while/repeat until looping construct in python?
wsonna at attglobal.net
Sat Mar 22 03:56:26 CET 2003
On Tue, 18 Mar 2003 13:29:05 +0100, Kim Petersen wrote:
> William Sonna wrote:
>> On Thu, 13 Mar 2003 09:27:07 -0600, sismex0 wrote:
>> [snip a lot]
>> On the other hand, if you have a valid reason why "self" is advantageous
>> FROM THE USER's POINT OF VIEW I would like to hear it.
> lets take this definition:
> def fun(x,y):
> while x<y:
> return i
> if (according to your definition) i wrote this outside of a class - it
> would make `i' a local variable in fun's namespace - if i wrote the same
> inside a class - then it would automagically be converted into the
> class'es namespace??? Then how do i differentiate between class
> variables and local variables - introduce a local <var> keyword similar
> to the global (and if only active in class scope then break the fact
> that functions work the same outside and inside)? no thanks .... more
> work and less productivity for me.
I'm glad to see that some people actually like "self".
As for the example above, what you say is true. That's why I cited the
example from another scripting language that allows mass qualification.
> And secondly - how do i call a class function - a function which cannot
> be identified by the calling object? eg: base.method() where my object
> is not derived from base but is mutable into the object (deliberatly
> (eg. by design) - call it an interface or whatever...)
I'm not sure I understand the issue. Maybe an example would help.
> oh - and all this is in the FAQ....
Thanks for reminding me. I'll make that one item f. in the list below :-)
>> I already know that:
>> a. "its already been talked to death! see html://blahblahblah"
>> b. "real Python programmers KNOW why"
>> c. "use (c++|Java|Perl|$your_pick) instead"
>> d. Python RULEZZZ
>> e. Please don't question the language or post critiques - somebody might agree
>> with you!!
>> So you can skip those (or cut and paste, if you prefer).
More information about the Python-list