Ben Finney wrote:
> Joe Strout <[EMAIL PROTECTED]> writes:
> 
>> One thing I miss as I move from REALbasic to Python is the ability
>> to have static storage within a method -- i.e. storage that is
>> persistent between calls
> 
> This is precisely what classes are for: allowing functionality and
> state to exist in a single object.
> 
>> but not visible outside the method.
> 
> Bind the state to a name with a single leading underscore (‘_foo’),
> which is the convention for “not part of the public interface”.
> Don't look for hard access restrictions, though, because they don't
> really exist in Python.
> 
Neither do typed variables, but that's not going to stop Joe ;-)

regards
 Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to