Standard behaviour of a getSomething method

Discussion in 'Python' started by Batista, Facundo, Jul 24, 2003.

  1. Resending... get no answers, don't remember if this mail reached the list.


    When I want to know about a attribute (e.g.: myAttrib) of an object, I
    should use the specific method (e.g.: getMyAttrib).

    Considering that this attribute is always another object (everything is an
    object in Python), what should getMyAttrib do?

    1) Return the object
    2) Return a copy of the object

    How do I return a copy of the object?

    Thanks for all.

    .. Facundo
     
    Batista, Facundo, Jul 24, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bruce varley
    Replies:
    2
    Views:
    412
    Mike Wahler
    Nov 25, 2003
  2. Ares Lagae

    Standard behaviour ?

    Ares Lagae, Nov 26, 2003, in forum: C++
    Replies:
    4
    Views:
    423
    Ares Lagae
    Nov 26, 2003
  3. eddiew_AUS
    Replies:
    18
    Views:
    649
    Andrey Tarasevich
    Jan 27, 2004
  4. Batista, Facundo

    Standard behaviour of a getSomething method

    Batista, Facundo, Jul 23, 2003, in forum: Python
    Replies:
    2
    Views:
    297
    Dan Williams
    Jul 24, 2003
  5. Andy Chambers
    Replies:
    1
    Views:
    402
    Daniel Dyer
    May 14, 2007
Loading...

Share This Page