I've had much success doing round trips through the lxml.html parser.
https://lxml.de/lxmlhtml.html
I ditched bs for lxml long ago and never regretted it.
If you find that you have a bunch of invalid html that lxml inadvertently
"fixes", I would recommend adding a stutter-step to your project:
On Thu, Feb 11, 2021 at 1:49 PM dn via Python-list
wrote:
> When I first met it, one of the concepts I found difficult to 'wrap my
> head around' was the idea that "open software" allowed folk to fork the
> original work and 'do their own thing'. My thinking was (probably)
> "surely, the
Received?
On Sun, Sep 16, 2018 at 3:39 PM Buck Evan wrote:
> I started to send this to python-ideas, but I'm having second thoughts.
> Does tihs have merit?
>
> ---
> I stumble on this a lot, and I see it in many python libraries:
>
> def f(*args, **kwargs):
> ...
&g
I started to send this to python-ideas, but I'm having second thoughts.
Does tihs have merit?
---
I stumble on this a lot, and I see it in many python libraries:
def f(*args, **kwargs):
...
f(*[list comprehension])
f(**mydict)
It always seems a shame to carefully build up an object in
Change by Buck Evan :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue34706>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Buck Evan :
Specifically in the case of a class that does not override its constructor
signature inherited from object.
Github PR incoming shortly.
--
components: Library (Lib)
messages: 325501
nosy: bukzor
priority: normal
severity: normal
status: open
title
Buck Evan added the comment:
@serhiy.storchaka This is a very stable piece of a legacy code base, so we're
not keen to refactor it so dramatically, although we could.
We've worked around this issue by compiling pyc files ahead of time and taking
extra care that they're preserved through
Buck Evan added the comment:
New data: The memory consumption seems to be in the compiler rather than the
marshaller:
```
$ PYTHONDONTWRITEBYTECODE=1 python -c 'import repro'
16032
$ PYTHONDONTWRITEBYTECODE=1 python -c 'import repro'
16032
$ PYTHONDONTWRITEBYTECODE=1 python -c 'import repro
New submission from Buck Evan:
In the attached example I show that there's a significant memory overhead
present whenever a pre-compiled pyc is not present.
This only occurs with more than 5225 objects (dictionaries in this case)
allocated. At 13756 objects, the mysterious pyc overhead is 50
Buck Evan added the comment:
Also, we've reproduced this in both linux and osx.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24085
10 matches
Mail list logo