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


Groups > comp.lang.python > #12553

Re: Constructors...BIIIIG PROBLEM!

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <airween@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.151
X-Spam-Level *
X-Spam-Evidence '*H*': 0.73; '*S*': 0.03; 'def': 0.15; 'class,': 0.15; 'subject:PROBLEM': 0.16; "why's": 0.16; 'wrote:': 0.16; 'header:In-Reply-To:1': 0.22; 'sep': 0.23; 'object,': 0.24; 'thu,': 0.28; '+0200,': 0.30; 'class': 0.30; 'to:addr:python- list': 0.33; 'header:User-Agent:1': 0.34; 'two': 0.37; 'hello,': 0.38; 'subject:: ': 0.39; 'to:addr:python.org': 0.39; 'your': 0.61; 'subject:!': 0.67; 'derive': 0.84; 'received:hu': 0.91; 'things:': 0.91
X-Spam-Score -1.354
X-Spam-Level
X-Spam-Status No, score=-1.354 tagged_above=-20 required=4 tests=[AWL=0.015, BAYES_00=-2.599, DNS_FROM_OPENWHOIS=1.13, RDNS_NONE=0.1]
Date Thu, 1 Sep 2011 10:24:29 +0200
From Hegedüs Ervin <airween@gmail.com>
To PYTHON <python-list@python.org>
Subject Re: Constructors...BIIIIG PROBLEM!
References <CABWGKeW6sw2GJghQRbPcUA7_EO2V7SX5iJH0Pz0u513wX9TPNw@mail.gmail.com> <8D536E41-941B-45A8-BD27-0896ACD8CCD5@xs4all.nl>
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Disposition inline
In-Reply-To <8D536E41-941B-45A8-BD27-0896ACD8CCD5@xs4all.nl>
User-Agent Mutt/1.5.21 (2010-09-15)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.651.1314865577.27778.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1314865577 news.xs4all.nl 2554 [2001:888:2000:d::a6]:54174
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:12553

Show key headers only | 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