A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-November/018770.html below:

[Python-Dev] __metaclass__

[Python-Dev] __metaclass__ [Python-Dev] __metaclass__Guido van Rossum guido@python.org
Thu, 29 Nov 2001 16:50:09 -0500
> Maybe I'm missing something, but why doesn't the following
> raise errors:
> 
> class X(object):
>     __metaclass__ = type
> 
> X()
> X(1)
> X(1, 2, 3, a="x", b="y")
> 
> I would have expected 'this constructor takes no arguments'
> errors on the last two lines. Or is this expected behaviour?

Neither object.__init__ nor object.__new__ pays any attention to its
argument list.  If they did, subclassing would be more difficult.

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4