Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #12553

Re: Constructors...BIIIIG PROBLEM!

Date 2011-09-01 10:24 +0200
From Hegedüs Ervin <airween@gmail.com>
Subject Re: Constructors...BIIIIG PROBLEM!
References <CABWGKeW6sw2GJghQRbPcUA7_EO2V7SX5iJH0Pz0u513wX9TPNw@mail.gmail.com> <8D536E41-941B-45A8-BD27-0896ACD8CCD5@xs4all.nl>
Newsgroups comp.lang.python
Message-ID <mailman.651.1314865577.27778.python-list@python.org> (permalink)

Show all headers | View raw


hello,

On Thu, Sep 01, 2011 at 10:00:27AM +0200, Michiel Overtoom wrote:
> On Sep 1, 2011, at 09:48, Amogh M S wrote:
[...]
> > class S:
> >    def _init_(self, name=None):
> >        self.name = name
> > s = S("MyName")
> 
> Two things: Derive your class from object,

why's that better than just create a simple class, without
derive?


thanks:

a.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Constructors...BIIIIG PROBLEM! Hegedüs Ervin <airween@gmail.com> - 2011-09-01 10:24 +0200

csiph-web