[EMAIL PROTECTED] a écrit :
> I am new to Python but come from a C++ background so I am trying to
> connect the dots :) . I am really liking what I see so far but have
> some nubee questions on what is considered good form. For one thing I
> am used to class variables
I assume you mean "instance
[EMAIL PROTECTED] writes:
> I am new to Python but come from a C++ background so I am trying to
> connect the dots :)
Welcome, and commiserations on your harsh upbringing :-)
> I am really liking what I see so far but have
> some nubee questions on what is considered good form.
This document is
Hi Phez
Generally, most Python programmers I know access and set class
attributes directly. This is done because of a Python feature called
property().
In many languages, setting class attributes directly is discouraged
because additional behavior may need to be associated with that setting,
[EMAIL PROTECTED] schrieb:
> Would you normally write methods to retrive and set your class
> variables or just refrence them directly?
>
you start by referencing them directly and ONLY if you need you can add
getters and setters later on without breaking any client code.
see the property functi
On 21 Oct 2006 01:17:32 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I am new to Python but come from a C++ background so I am trying to
> connect the dots :) . I am really liking what I see so far but have
> some nubee questions on what is considered good form. For one thing I
> am used t