all the time. Moreover,
it's very hard to notice *in your own code* because you read what you
meant, not what you wrote. Ask any author about proof-reading, and
they'll tell you to get someone else to do it.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
New submission from David James Peters <pebau...@gmail.com>:
The ConfigParser().write() does not save the comments; this makes using
comments harder because it requires a separate demo ini file the user must be
able to locate and read from without learning anything from the IN
like that. They
are, without fail, embarrassed when I turn on the compiler warning flags.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
, you will wish you had) and
read the file back.
Is there any other option for getting interactive multi line input from user.
input() and patience :-)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
Change by James Lu <bitfl...@gmail.com>:
--
nosy: +tacocat
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32533>
___
__
Change by James Lu <bitfl...@gmail.com>:
--
nosy: +tacocat
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33090>
___
__
through entries, surely?
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
what you're after.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
atting
their code if I have to work on it.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
uare brackets as you normally would for your
shell, with backslashes I presume. Then you need to escape the
backslashes so they aren't interpreted specially by Python, with more
backslashes.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
a console running, all you should need to do then is type
"idle" at the prompt. That should open a window, which amongst other
things will tell you the version of Python it is using. If that fails,
try "idle -n" instead; it may not make any difference, but it's worth a go.
-
nal window on your OS or the IDLE program? What exactly do you
mean by "the binary its [sic] running with"?
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
James Davis <davis...@vt.edu> added the comment:
Equivalent, probably cleaner. Comment on the PR if you want a change.
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Change by James Davis <davis...@vt.edu>:
--
keywords: +patch
pull_requests: +5750
stage: -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
New submission from James Davis <davis...@vt.edu>:
The decoder regex used to parse numbers in the fpformat module is vulnerable to
catastrophic backtracking.
'^([-+]?)0*(\d*)((?:\.\d*)?)(([eE][-+]?\d+)?)$'
The substructure '0*(\d*)' is quadratic.
An attack string like '+0000++' bl
New submission from James Davis <davis...@vt.edu>:
Hi Python security team,
My name is James Davis. I'm a security researcher at Virginia Tech.
The python core (cpython) has 2 regular expressions vulnerable to catastrophic
backtracking that look like potential DOS vectors.
The vuln
= self.defaults.copy()
vars.update(kwds)
# Do the work with vars['bashful'] etc
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
of signed arithmetic overflow
undefined, so you have no portability guarantees there.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
of the benchmarks Pythonic, but still food for thought.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
le in Mathematica, such as
expr2bdd, is there really any domain of computation where Mathematica is
inferior to Python?
Not knowing much about Mathematica, all I can say is "almost certainly."
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
o use libnl (in some
suitable wrapping), but my experience with that is that it is badly
documented and horrendously unreliable.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
James Bailey <james.bai...@gmail.com> added the comment:
Agreed with ruffsl's concerns about the overly aggressive detection of infinite
recursion.
I also wonder if the hrefs should be normalized or canonized for the check? The
check may miss infinite recursions if the hrefs
pass just the title:
x = MyRegex.findall(MyDict['/Title'])
Otherwise you will have to loop through all the entries in the dictionary:
for entry in MyDict.values():
x = MyRegex.findall(entry)
# ...and do something with x
I rather suspect you are going to find that the titles ar
out possible alternatives
None shall pass.
(Seriously. I'm disappointed in all of you :-)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
On 30/01/18 16:47, alister via Python-list wrote:
The British TV show QI seemed to think this is actually part of the Dutch
driving test although they have been known to make mistakes
It has to be noted that the QI Elves did not do particularly well in
Only Connect...
--
Rhodri James
little traditional reading algorithm. So I probably
should have said "If NN's can ...".
No, you should have said "If NNs can..." without the grocer's apostrophe :-)
(Well, it seems to be that sort of thread.)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
to modify those components with
each update and ultimately you just end up generating work for yourself.
James
On 2 January 2018 at 21:21, Etienne Robillard <tkad...@yandex.com> wrote:
> Hi James,
>
> Part of the problem is because the CFFI and uWSGI developers aren't
> int
bindings for C calls with CFFI and clang and posted to
a CFFI forum. (Why clang? GCC/G++ will work just as well and may be the
default).
Hope that helps.
James
--
https://mail.python.org/mailman/listinfo/python-list
I have an example of loading and communicating with a dynamic library using
ctypes in Windows here:
https://github.com/James-Chapman/python-code-snippets/tree/master/DLL_C_funcs_w_callbacks
It shouldn't be too dissimilar on Linux.
What starts uWSGI? Is it started from a Python application
3rd party plugin (mostly GitHub)
where you can see the source code for each plugin. This is a very good
starting point as there are many examples here:
https://uwsgi-docs.readthedocs.io/en/latest/ThirdPartyPlugins.html
Perhaps you can clarify.
James
On 30 December 2017 at 01:00, Etienne
/txvB4IBtlUrn3TuB0rtu/
Nope. Not following a link from someone I don't know (with all due
respect) with a URL I don't immediately recognise. If you want help,
post your code here, preferably trimmed down to the minimum you need to
demonstrate the problem.
--
Rhodri James *-* Kynesim Ltd
--
https
On 18/12/17 16:33, Marko Rauhamaa wrote:
Rhodri James <rho...@kynesim.co.uk>:
I haven't often been involved in hiring, but the few times I have we
had more applicants than it was feasible to interview.
You don't have to interview them all. Once you encounter an excellent
candidate, y
job, sadly).
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
ted to use.
I see your point as a teacher, but after all this *is* a Python mailing
list and not a python-homework-support mailing list.
That implies you shouldn't have answered a homework assignment at all :-p
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
always felt that
having names determine types was somehow mucky.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
% of the way there and shown his
working, which is truly excellent, but what he needed was for someone to
hint at how to search through the array, not to be handed a working
example with no explanation.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
ble is a service to no one.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
On 03/11/17 18:12, Israel Brewster wrote:
On Nov 3, 2017, at 7:11 AM, Rhodri James <rho...@kynesim.co.uk> wrote:
People generally understand how to move data around, and the mistakes are
usually pretty obvious when they happen.
I think the existence of this thread indicates oth
On 03/11/17 14:50, Chris Angelico wrote:
On Fri, Nov 3, 2017 at 10:26 PM, Rhodri James <rho...@kynesim.co.uk> wrote:
On 02/11/17 20:24, Chris Angelico wrote:
Thank you. I've had this argument with many people, smart people (like
Steven), people who haven't grokked that all concurren
markedly
less buggy and not much slower if it had been written sequentially.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
this is also a newsgroup). Could you repeat them in the
body of your message? If they include the exact error messages and any
traceback, that would be a great help.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
self in a coding style
(quick and dirty) that ought to be rejected in any code that isn't
completely ephemeral. And in my experience, most "throw-away" code
isn't thrown away.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
lly shouldn't have
been. It might have been Ned's MUA, or some obscure bug in the
mail-to-news gateway. Does anyone in a position to know have any opinions?
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
. The
function that's doing the calling that gets its expectation of flow
control broken has no clue, and that's my problem.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
that will be coming to you.)
c) if (variable) { ... } in place of if (variable) { ... } ?
I assume you mean "if (variable != NULL)" here. Again, it emphasises
the type; variable will be a pointer.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
to up our rates for dealing with this
code. It took several days to do the work anyway, which was punishment
enough at our rates.)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
;li" and nothing refers to our new object
[1,2,3,4,5,100,200] any more. Python will quietly delete it ("garbage
collect") in the background.
The key is that "+" on its own creates a new object, while "+=" alters
the existing object.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
On 16/10/17 16:07, Grant Edwards wrote:
Ah yes. I solved problem that by writing a wrapper around slrn so
that my .newsrc and .score files reside "in the could".
^
Now there's a typo someone should run with :-)
--
Rhodri James *
dealt with the outside world via a serial
port was _painful_.
Amen, brother.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
sible when rendered as
either C or Python (or the high-level language of your choice, I imagine).
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
tedious and gives you less visual advantage, so I don't
bother. Somewhere in the middle is a tipping point.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
context of real languages and
|real problems.
That would go a long way to explaining why I tried and failed to learn
C++ three times from Stroustrup's books.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
e (object).
I think I'll continue to call them callables. That way I won't burst
into giggles when I accidentally think of them as church dignitaries.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
, and at
worst makes it useless; tools that do that tend not to get used.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
t;>> print(p.x)
3
>>> p.x = 7
>>> print(p)
(7,4)
>>> p.z = 2
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'Point' object has no attribute 'z'
I pretty much never bother to do this because (bart to the contrary) it
isn't use
are as flat out wrong as if you think Small Gods
is just about a deity having to work on being believed in.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
eas/2013-June/021610.html
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
like language, one could write:
while x = int( input( "Number (enter 0 to terminate)? " ))
print( f'Square = { x**2 }' )
One could. One would richly deserve the compiler warnings one got as a
result, but one could.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
it down into manageable chunks; something as simple as the odd blank
line to "paragraph" your code can make that a lot easier.
Experience also suggests a correlation between code that's hard to read
and code that's rather crap.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.o
/
:-)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
On 25/09/17 20:40, Marko Rauhamaa wrote:
Rhodri James <rho...@kynesim.co.uk>:
On 25/09/17 15:26, Marko Rauhamaa wrote:
That's not what I said. I said all expressions *evaluate to* pointers.
This may well be true in particular implementations, but it is an
implementation detail so
saying:
A pointer to the object is stored in the variable.
It really isn't.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
as less effort to ignore Py3 entirely.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
On 21/09/17 16:12, Steve D'Aprano wrote:
On Thu, 21 Sep 2017 08:19 pm, Rhodri James wrote:
(That's basically my gripe against print becoming a function in Python3.
It makes a lot of sense as has already been pointed out, but it breaks
every beginners tutorial.)
Nobody made that decision
aks
every beginners tutorial.)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
was my birthday the other day. People at worked asked how old I
was. I replied:
((3**2)+math.sqrt(400))*2
Quite a few people somehow came up with 47. And these are technical people.
You obviously look very spry for your age.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/li
On 19/09/17 17:52, justin walters wrote:
On Tue, Sep 19, 2017 at 9:12 AM, Rhodri James <rho...@kynesim.co.uk> wrote:
Eh, my school never 'ad an electronics class, nor a computer neither. Made
programming a bit tricky; we 'ad to write programs on a form and send 'em
off to next county.
t university. I think they now happen later in the first
year; looking at the on-line syllabus, the first two terms of IA Maths
are now full of things that used to be taught at A-level.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
going on behind the curtains. Therefore, for
a profound understanding of Python, everyone should learn BASIC
first, just like I did!
Tsk. You should have learned (a fake simplified) assembler first, then
you'd have an appreciation of what your processor actually did.
:-)
--
Rhodri James *-* K
".
'next sentence' is the operative piece. I think that if the bit
about placement was moved to the end of the paragraph the whole thing would
be more readable and I wouldn't have stumbled on it.
If it had meant "the imported module's names" or indeed "the imported
modules' nam
implicit. Given your very literalist interpretations, I would
suggest that trying to make deductions based on the Zen is a waste of time.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
ssible because every integer has
a finite number of digits (in base 10).
Surely an infinitely large integer has an infinite number of digits?
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
ntical.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
ng + user_string.zfill(4)
'a0001'
Note you should think VERY CAREFULLY about any user input like this.
What are you going to do the user gives you too many digits, too few
digits, non-digits?
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
something that isn't an integer for yourself!
In Python3, it was generally agreed that the fancy behaviour of input()
caused more confusion than it was worth. input() in Python3 behaves
like raw_input() in Python2, just returning the characters typed in as a
string.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
How to run "pydoc3 -p port" in background?
TIA
James
--
https://mail.python.org/mailman/listinfo/python-list
uld rather like str.equal("ß", "ss") to be true.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
i (https://wiki.python.org/moin/RdfLibraries) there
are several RDF libraries. I don't know how formally tested they are.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
traction with this is to have a
separate case-insensitive string class. That feels a bit heavyweight,
though.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
t what the heck.
That's only (!) 9007199523176448 values to test, which my machine seemed
to be quite happy with, but you could repeat the exercise with more
layers if you really wanted to.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
for it, don't ask him.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
mechanics breaks down near the speed of light,
or pretty much everything intuitive breaks down at quantum scales.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
On 19/07/17 09:17, Steven D'Aprano wrote:
On Tue, 18 Jul 2017 16:37:37 +0100, Rhodri James wrote:
(For the record, one of my grandmothers would have been baffled by this
conversation, and the other one would have had definite opinions on
whether accents were distinct characters
thereof. All following, more or less, the rule of
using a double consonant after a short vowel in contexts where a
single consonant would suggest the preceding vowel was long.
The single/double consonant rule is indeed an ancient Germanic spelling
principle. English makes several twists to the it:
It
ings in the central area, as I recall southern Irish displacing
Picts in Scotland, and then the Norman French (themselves starting from
Vikings ["nor(se)man"]).
Sorry, but even the Gaels/Gauls were invaders :-)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
On 18/07/17 15:10, Rustom Mody wrote:
On Monday, July 17, 2017 at 10:14:00 PM UTC+5:30, Rhodri James wrote:
On 17/07/17 05:10, Rustom Mody wrote:
Hint1: Ask your grandmother whether unicode's notion of character makes sense.
Ask 10 gmas from 10 language-L's
Hint2: When in doubt gma usually
I'm a tad biased.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
L. Mencken). Unfortunately grandmothers outside their areas
of expertise are particularly prone to finding those answers.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
On 14/07/17 15:14, Marko Rauhamaa wrote:
Rhodri James <rho...@kynesim.co.uk>:
On 14/07/17 14:31, Marko Rauhamaa wrote:
Of course, UTF-8 in a bytes object doesn't make the situation any
better, but does it make it any worse?
Speaking as someone who has been up to his elbows in this re
On 14/07/17 15:32, Michael Torrie wrote:
On 07/14/2017 08:05 AM, Rhodri James wrote:
On 14/07/17 14:31, Marko Rauhamaa wrote:
Of course, UTF-8 in a bytes object doesn't make the situation any
better, but does it make it any worse?
Speaking as someone who has been up to his elbows
layer of complexity to all of the questions you were asking, and more.
A single codepoint is a meaningful thing, even if its meaning may be
modified by combining. A single byte may or may not be meaningful.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
hread in an infinite loop when you do that. Why
are you doing that anyway?
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
based hw. Doubly so for "managed" languages where gc buys space for time.
You might want to do some benchmarks to sound out that idea. I believe
conventional wisdom is that the time cost of allocating more memory and
extending the list outweighs the space cost of wasted memory.
--
Rh
for me. Have you tried Peter's suggestion of typing
>>> import person
>>> person.__file__
into IDLE? It is very likely that you are not picking up the
"person.py" that you think you are.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
False, and they are distinct from the objects 1 and 0.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
an implementation detail, but you weren't going to
do that, were you?
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
is just plain rude.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
e atomic without some
hint of proof :-)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
Changes by James Tocknell <aragilar+pythonb...@gmail.com>:
--
pull_requests: +2628
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
401 - 500 of 4053 matches
Mail list logo