Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] folding cElementTree behind ElementTree in 3.3

Nick Coghlanncoghlan at gmail.com
Tue Feb 21 23:21:21 CET 2012


On Wed, Feb 22, 2012 at 7:47 AM, "Martin v. Löwis" <martin at v.loewis.de> wrote:> Am 21.02.2012 11:41, schrieb Eli Bendersky:>> I can't fathom why someone would do it though, since bar tiny>> differences (like this one) cET is just a faster ET and it's available>> practically everywhere with CPython. I mean, is it really important to>> be able to subclass ET.Element? What goal does it serve?>> Statements like this make me *extremely* worried. Please try to adopt> a position of much higher caution, accepting that a change is> "incompatible" if there is a remote possibility that someone might> actually rely on the original behavior. Otherwise, I predict that you> will get flooded with complaints that you broke ET for no good reason.Indeed. It's a *major* PITA at times (and has definitely led to someugly workarounds), but we have to take documented API compatibilityvery seriously.We're often even reluctant to change long-standing *de facto*behaviour, let alone things that are written up in the docs as beingexplicitly supported. In Python 3, merely saying "this class" or "thistype" is as good as saying "this instance of the type metaclass" asfar as API guarantees go. That's the reason for the awkward phrasingin the functools docs - specifically to *avoid* saying thatfunctools.partial is a class, as we want to allow closure-basedimplementations as well.The key thing to remember is that the web-style "eh, just change it,people can fix their code to cope" mentality is a tiny *minority* inthe global software development community. There's a huge amount ofPython code out there, and a lot of it is hidden behind corporatefirewalls. Our attention to backward compatibility concerns is one ofthe reasons why Python's reach extends into so many different areas.Cheers,Nick.-- Nick Coghlan   |  ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp