Re: classes

Discussion in 'Python' started by Chris Angelico, Oct 24, 2012.

  1. On Thu, Oct 25, 2012 at 2:14 AM, Zero Piraeus <> wrote:
    > By the way ... while Bag.addtwice() is legal Python [and I understand
    > that you're just playing around here], a method that both "does
    > something" [changes the object] and "gives something" [returns a
    > useful value] when that's not strictly necessary isn't brilliant
    > style.


    Side point: It's not that it's *bad* code or even bad style; it just
    isn't the way Python generally does things.

    ChrisA
     
    Chris Angelico, Oct 24, 2012
    #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. David

    Classes within classes

    David, Jul 21, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    4,984
    David
    Jul 22, 2005
  2. lonelyplanet999
    Replies:
    1
    Views:
    2,268
    VisionSet
    Nov 13, 2003
  3. Carfield Yim
    Replies:
    1
    Views:
    1,523
    Andrew Thompson
    May 31, 2004
  4. Razvan
    Replies:
    11
    Views:
    939
    Andrew Thompson
    Jul 17, 2004
  5. Razvan
    Replies:
    5
    Views:
    11,347
    Dale King
    Jul 27, 2004
Loading...

Share This Page