Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Peter Pearson Newsgroups: comp.lang.python Subject: Re: What arguments are passed to the __new__ method ? Date: 2 Mar 2016 17:40:17 GMT Lines: 20 Message-ID: References: <56d5d043$0$632$426a74cc@news.free.fr> X-Trace: individual.net 5hnNENkUYuwl6J74+a5IlQlDyAGdhajzZmbutd7/mc8T6DHMPr Cancel-Lock: sha1:2oBa4U11a7oClLtL7WL8TvYpCTk= User-Agent: slrn/pre1.0.0-18 (Linux) Xref: csiph.com comp.lang.python:103887 On Tue, 1 Mar 2016 18:24:12 +0100, ast wrote: > > It's not clear to me what arguments are passed to the > __new__ method. Here is a piece of code: > > > class Premiere: > > def __new__(cls, price): > return object.__new__(cls) > > def __init__(self, price): > pass [snip] Of course, maybe you don't need to define a __new__ method at all. Personally, I find that __init__ suffices for my simple needs. -- To email me, substitute nowhere->runbox, invalid->com.