Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail From: ram@zedat.fu-berlin.de (Stefan Ram) Newsgroups: comp.lang.python Subject: Re: Using __new__ Date: 17 Feb 2024 22:51:29 GMT Organization: Stefan Ram Lines: 10 Expires: 1 Feb 2025 11:59:58 GMT Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de GGuATJeX5gW8q+MH6UMTUA9Ml+gH217C6Rnf/emeIZ/gwp Cancel-Lock: sha1:oMSCJW5DhoZ30rv8o4zKB6FqR04= sha256:0ybWhV05ndgzcJrUTBfqryaYDXjUhZ3DJd+ItoMc7qE= X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved. Distribution through any means other than regular usenet channels is forbidden. It is forbidden to publish this article in the Web, to change URIs of this article into links, and to transfer the body without this notice, but quotations of parts in other Usenet posts are allowed. X-No-Archive: Yes Archive: no X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some services to mirror the article in the web. But the article may be kept on a Usenet archive server with only NNTP access. X-No-Html: yes Content-Language: en-US Accept-Language: de-DE-1901, en-US, it, fr-FR Jonathan Gossage writes: >I am attempting to use the __new__ method in the following code: >class SingletonExample(object): Above, you specify that the superclass is "object". >super().__new__(cls, **kwargs) Now, since you know the superclass to be "object", why can't you just write "super().__new__( cls )"?