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/2012-February/116730.html below:

[Python-Dev] folding cElementTree behind ElementTree in 3.3

[Python-Dev] folding cElementTree behind ElementTree in 3.3Andrew McNabb amcnabb at mcnabbs.org
Tue Feb 21 23:16:10 CET 2012
On Tue, Feb 21, 2012 at 10:47:43PM +0100, "Martin v. Löwis" wrote:
> > 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.

I'm happy to stand up as an example of someone who uses a custom Element
class.  My specific use case is loading the project Gutenberg database,
which is a 210MB XML file.  I created a custom Element class which I use
for the top-level element (a custom element_factory passed to
TreeBuilder distinguishes between the top-level element and all others).
The custom Element class doesn't add children, so it keeps ElementTree
from storing all of the elements its seen so far.  On a system with 1 GB
of RAM, there was no other way to get the file to load.

So, I would be one of those people who would flood in the complaints. :)

--
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868
More information about the Python-Dev mailing list

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