[Python-Dev] subclassing builtin data structures (original) (raw)

Alexander Belopolsky alexander.belopolsky at gmail.com
Fri Feb 13 19:19:08 CET 2015


On Fri, Feb 13, 2015 at 1:11 PM, Guido van Rossum <guido at python.org> wrote:

Note that the original pure python prototype of the datetime module had date.add and friends call self.class(year, month, day). Unfortunately, it looks like the original sandbox did not survive the the hg conversion, so I cannot provide a link to the relevant history. FWIW you're wrong when you claim that "a constructor is no different from any other method". Someone else should probably explain this (it's an old argument that's been thoroughly settled).

Well, the best answer I've got in the past [1] was "ask on python-dev since Guido called the operator overriding expectation." :-)

[1] http://bugs.python.org/issue2267#msg108060 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20150213/79e21254/attachment.html>



More information about the Python-Dev mailing list