I would normally agree, except...
This is a refcount issue (I was able to reproduce the problem, gbd shows a
free error )
And I wouldn't recommend DGBing a refcount issue as a beginner to debugging.
The other mailing list identified a PIL bug that messes up the refcount for
True, but this refcou
Try setting encoding to: "utf-8-sig".
'eb bb bf' is the byte order mark for UTF8 (most systems do not include
this in UTF-8 encoded files)
Python will correctly read UTF8 BOMs if you use the 'utf-8-sig' encoding
when reading files
Steve
On Tue, Feb 9, 2021 at 2:56 PM Skip Montanaro
wrote:
>
I don't particularly like to encourage this shotgun help request because,
as previous commenter suggests, debugging this yourself is best.
Sometimes debugging is super hard, and especially so when uncommon
situations occur, but it's always far easier to debug things when you have
visibility into t
/cd80f430daa7dfe7feeb431ed34f88db5f64aa30/Lib/email/utils.py#L51
On Wed, Feb 17, 2021 at 5:42 PM Stestagg wrote:
> I don't particularly like to encourage this shotgun help request because,
> as previous commenter suggests, debugging this yourself is best.
>
> Sometimes debugging is super hard, and e
With numpy and pandas, it's almost always best to start off with the
simple, obvious solution.
In your case, I would recommend defining a function, and calling
`Series.map`, passing in that function.
Sometimes, however, with large datasets, it's possible to use some
pandas/numpy tricks to signif
There is also the, I think seldom used, feature that calling python with
'-O' removes all assert statements at parse/compile time (I believe for
performance reasons)
So for example:
$ python -c 'assert False'
Traceback (most recent call last):
File "", line 1, in
AssertionError
But:
$ python
On Tue, Mar 23, 2021 at 3:20 PM Michael Torrie wrote:
> On 3/23/21 5:19 AM, Paul Edwards wrote:
> > Thanks for the tip. I don't actually need it to be
> > light. I just need it to be C90-compliant.
>
> I guess the point with MicroPython is that since it can build on all
> sorts of microcontroller
On Mon, Mar 29, 2021 at 2:32 PM Alexey wrote:
> понедельник, 29 марта 2021 г. в 15:57:43 UTC+3, Julio Oña:
> > It looks like the problem is on celery.
> > The mentioned issue is still open, so not sure if it was corrected.
> >
> > https://manhtai.github.io/posts/memory-leak-in-celery/
>
> As I me
> > 2. Can you try a test with 16 or 32 active workers (i.e. number of
> > workers=2x available memory in GB), do they all still end up with 1gb
> > usage? or do you get any other memory-related issues running this?
> Yes. They will consume 1Gb each. It doesn't matter how many workers I
> have,
> t
> I'm sorry. I didn't understand your question right. If I have 4 workers,
> they require 4Gb
> in idle state and some extra memory when they execute other tasks. If I
> increase workers
> count up to 16, they`ll eat all the memory I have (16GB) on my machine and
> will crash as soon
> as system ge
I'm not certain this is the clearest possible code pattern to use, but
depending on the structure of your larger code, it's possible to do this,
and the compactness may help with understandability (that's a judgement
call!):
[dict(d, name=n) for n, d in dod.items()]
On Tue, Mar 30, 2021 at 12:42
For completeness, from 3.5 onwards, you can also do the following:
[{'name': n, **d} for n, d in dod.items()]
On Tue, Mar 30, 2021 at 1:06 PM Chris Angelico wrote:
> On Tue, Mar 30, 2021 at 11:01 PM Jon Ribbens via Python-list
> wrote:
> >
> > On 2021-03-30, Chris Angelico wrote:
> > > I dunn
On Wed, Apr 7, 2021 at 12:31 PM Chris Angelico wrote:
>
> I just realised that the whole eval/exec/namespace stuff is massive
> overkill. All you need is an object that is inconsistent in its
> boolification...
>
>
Somewhat related: https://bugs.python.org/issue42899
Steve
--
https://mail.pytho
I'm guessing here a little bit, but it looks like the author expects you to
run this code in a jupyter notebook, rather than in an ipython interactive
console.
The jupyter and ipython projects are related (the same?) which can cause
some confusion, but if you run the code you shared in a jupyter l
On Tue, Apr 27, 2021 at 12:52 PM elas tica wrote:
>
> > However, in this case, the general information in the docs is
> > absolutely sufficient, and the basic principle that the repr should
> > (where possible) be a valid literal should explain what's needed.
>
>
> This is a subjective statement.
Where's this discussion going?
Let's not get too caught up on definitions or the sizes of everyone's
respective .. newsgroups.
Which of the practically possible options are best for this list <->
newsgroup setup?
Thanks
Steve
On Thu, May 6, 2021 at 6:47 PM Jon Ribbens via Python-list <
python-
On 2021-05-12 15:48, Michael F. Stemper wrote:
> > On 12/05/2021 08.26, Dino wrote:
> >
> >> Hi, here's my (probably unusual) problem. Can a Python (3.7+) script
> >> access its own source code?
> >
> > Here is a fairly simple python program that reads itself:
> >
> > =
On Sun, 23 May 2021 at 20:37, hw wrote:
> On 5/23/21 7:28 PM, Peter Otten wrote:
> > On 23/05/2021 06:37, hw wrote:
> >>
> >> Hi,
> >>
> >> I'm starting to learn python and have made a little example program
> >> following a tutorial[1] I'm attaching.
> >>
> >> Running it, I'm getting:
> >>
> >>
You can do the following:
_,v = d.popitem()
Or:
key, value = d.popitem()
Steve
On Mon, 14 Jun 2021 at 20:10, Greg Ewing
wrote:
> On 14/06/21 4:19 am, BlindAnagram wrote:
> > Am I missing the obvious way to obtain the value (or the key) from a
> > dictionary that is known to hold only one ite
Hi
Do you have a file or folder named 'flask' in the same directory as www.py
by any chance?
Steve
On Thu, Jul 8, 2021 at 4:50 PM vergos@gmail.com <
vergos.niko...@gmail.com> wrote:
> i just moved from bottleframework to flask. I changes what needed to be
> altered to convert the code and w
unt its evene worse
> as the file flask is not entered into PATH.
>
> So i guess as root i have to install flask, but then why cant it import
> 'run" ?
>
> [root@superhost ~]# whereis flask
> flask: /usr/local/bin/flask
>
> Στις Πέμ, 8 Ιουλ 2021 στις 7:02 μ.
If you're doing this analysis, I'd be pretty interested in how many of
those while loops where 'while True:'
I'd wager 75%. But may be completely off
Steve
On Sat, 28 Aug 2021 at 23:03, Hope Rouselle wrote:
> r...@zedat.fu-berlin.de (Stefan Ram) writes:
>
> > Hope Rouselle writes:
> >>Have y
On Sun, 29 Aug 2021 at 00:04, Stefan Ram wrote:
> Stestagg writes:
> >If you're doing this analysis, I'd be pretty interested in how many of
> >those while loops where 'while True:'
>
> Here, about 40 %.
Thanks! That's an interesting stat.
Hi
I was hoping to canvas opinion on using classmethods as constructors over
__init__.
We've got a colleague who is very keen that __init__ methods don't contain any
logic/implementation at all, and if there is any, then it should be moved to a
create() classmethod.
As a concrete example, one
24 matches
Mail list logo