Ned Batchelder <n...@nedbatchelder.com> added the comment:
Turns out it's even simpler:
$ pydoc itertools
No module named 'ast'
# !!!
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
New submission from Ned Batchelder <n...@nedbatchelder.com>:
"pydoc coverage" worked with 3.7b2, but fails with a surprising
ModuleNotFoundError for configparser with b3. The configparser is importable
in the Python interpreter. I tried with -v to what import
On 3/26/18 7:10 PM, Python wrote:
Humans are already good enough at making mistakes that they
require no additional encouragement, such as what is
provided by allowing such syntactical horrors.
Agreed. And that's why we must respect and follow the code
styling wisdom which has been passed down
On 3/23/18 12:39 PM, Malcolm Greene wrote:
Perhaps it doesn't need to be said, but just to be sure: don't use eval if you
don't trust the people writing the configuration file. They can do nearly
unlimited damage to your environment. They are writing code that you are
running.
Of course!
On 3/23/18 4:30 AM, Malcolm Greene wrote:
Looking for advice on how to expand f-string literal strings whose
values I'm reading from a configuration file vs hard coding into
my script as statements. I'm using f-strings as a very simple
template language.
I'm currently using the following
On 3/20/18 12:08 PM, Rick Johnson wrote:
On Tuesday, March 20, 2018 at 7:03:11 AM UTC-5, Adriaan Renting wrote:
(on the subject of the opioid epidemic)
The [OT] in the subject line is right: let's not get off on a political
tangent.
--Ned.
--
On 3/19/18 1:04 PM, Irv Kalb wrote:
I am building some classes for use in future curriculum. I am using PyCharm
for my development. On the right hand edge of the PyCharm editor window, you
get some little bars indicating warnings or errors in your code. I like this
feature and try to clean
On 3/15/18 12:35 PM, Peter Otten wrote:
Ned Batchelder wrote:
On 3/15/18 9:57 AM, Vlastimil Brom wrote:
2018-03-15 12:54 GMT+01:00 Arkadiusz Bulski <arek.bul...@gmail.com>:
I have a custom class (a lazy list-like container) that needs to support
slicing. The __getitem__ checks if
On 3/15/18 9:57 AM, Vlastimil Brom wrote:
2018-03-15 12:54 GMT+01:00 Arkadiusz Bulski :
I have a custom class (a lazy list-like container) that needs to support
slicing. The __getitem__ checks if index is of slice type, and does a list
comprehension over individual
Ned Batchelder <n...@nedbatchelder.com> added the comment:
As is usual for me, I am here because some coverage.py code broke due to this
change. A diff between b1 and b2 found me the code change (thanks for the
comment, btw!), but a What's New doesn't seem out of
Ned Batchelder <n...@nedbatchelder.com> added the comment:
Should this get an entry in the What's New?
--
nosy: +nedbat
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
On 3/4/18 5:25 PM, Ooomzay wrote:
On Sunday, 4 March 2018 14:37:30 UTC, Ned Batchelder wrote:
Are you including cyclic references in your assertion that CPython
behaves as you want?
Yes. Because the only behaviour required for RAII is to detect and debug such
cycles in order to eliminate
On 3/4/18 9:11 AM, Ooomzay wrote:
I am well aware of what it will mean for interpreters. For some interpreters it
will have zero impact (e.g. CPython) ...
There's no point continuing this if you are just going to insist on
falsehoods like this. CPython doesn't currently do what you want,
On 3/4/18 7:37 AM, Ooomzay wrote:
On Sunday, 4 March 2018 04:23:07 UTC, Steven D'Aprano wrote:
[...]
[This PEP] imposes enormous burdens on the maintainers of at least five
interpreters (CPython, Stackless, Jython, IronPython, PyPy) all of which
will need to be re-written to have RAII
On 3/4/18 8:26 AM, Ooomzay wrote:
On Sunday, 4 March 2018 03:16:31 UTC, Paul Rubin wrote:
Chris Angelico writes:
Yep, cool. Now do that with all of your smart pointers being on the
heap too. You are not allowed to use ANY stack objects. ANY. Got it?
That's both
On 2/28/18 6:53 PM, ooom...@gmail.com wrote:
On Wednesday, February 28, 2018 at 11:45:24 PM UTC, ooo...@gmail.com wrote:
On Wednesday, February 28, 2018 at 11:02:17 PM UTC, Chris Angelico wrote:
On Thu, Mar 1, 2018 at 9:51 AM, ooomzay wrote:
[snip]
Taking a really simple situation:
class
On 3/2/18 10:36 AM, Paul Moore wrote:
Or (real Python):
def fn():
for i in range(1):
with open(f"file{i}.txt", "w") as f:
f.write("Some text")
How would you write this in your RAII style - without leaving 10,000
file descriptors open until the
On 3/1/18 7:40 AM, Thomas Nyberg wrote:
On 03/01/2018 12:46 PM, bartc wrote:
If they're only called once, then it probably doesn't matter too much in
terms of harming performance.
Oh yeah there's no way this has any affect on performance. A smart
compiler might even be able optimize the call
On 2/28/18 7:01 PM, Etienne Robillard wrote:
What do rats find rewarding in play fighting?
This is well outside the topics for this list.
--Ned.
Le 2018-02-28 à 18:29, Chris Angelico a écrit :
On Thu, Mar 1, 2018 at 10:23 AM, Steven D'Aprano
wrote:
On 2/28/18 4:13 PM, Etienne Robillard wrote:
I want to know why this question is being silently ignored by this group.
If no one has any information about your topic, then no one will say
anything. Python on Android is very specialized as it is, and I have no
idea what ultrasonic side
On 2/27/18 3:52 AM, Kirill Balunov wrote:
a. Is this restriction for locals desirable in the implementation of
CPython in Python 3?
b. Or is it the result of temporary fixes for Python 2?
My understanding is that the behavior of locals() is determined mostly
by what is convenient for the
On 2/26/18 10:09 AM, Chris Angelico wrote:
On Tue, Feb 27, 2018 at 2:02 AM, bartc <b...@freeuk.com> wrote:
On 26/02/2018 14:04, bartc wrote:
On 26/02/2018 13:42, Ned Batchelder wrote:
Well, once you notice that the
Python code had N=1e5, and the C code had N=1e9 :) If yo
On 2/26/18 7:13 AM, bartc wrote:
On 26/02/2018 11:40, Chris Angelico wrote:
On Mon, Feb 26, 2018 at 10:13 PM, bartc wrote:
Below is the first draft of a Python port of a program to do with
random
numbers. (Ported from my language, which in turned ported it from a C
program
On 2/24/18 2:08 PM, Peng Yu wrote:
On Sat, Feb 24, 2018 at 12:45 PM, Wildman via Python-list
wrote:
On Sat, 24 Feb 2018 11:41:32 -0600, Peng Yu wrote:
I would like to just get the escaped string without the single quotes.
Is there a way to do so? Thanks.
x='\n'
On 2/23/18 3:02 PM, bartc wrote:
On 23/02/2018 19:47, Chris Angelico wrote:
On Sat, Feb 24, 2018 at 6:25 AM, bartc wrote:
The difference between Python and another dynamic language might be a
magnitude, yet you say it doesn't matter.
Thanks, that makes me feel much better
On 2/22/18 11:00 AM, bartc wrote:
On 22/02/2018 12:03, bartc wrote:
On the fib(20) test, it suggests using this to get a 30,000 times
speed-up:
BTW while doing my tests, I found you could redefine the same function
with no error:
def fred():
pass
def fred():
pass
def fred():
On 2/20/18 5:47 AM, Antoon Pardon wrote:
On 19-02-18 16:18, Ned Batchelder wrote:
On 2/19/18 9:54 AM, Steven D'Aprano wrote:
On Mon, 19 Feb 2018 13:28:26 +, Paul Moore wrote:
[1] The most basic question, which people making such claims often
can't
answer, is "Do you mean that v
On 2/19/18 1:01 PM, Paul Moore wrote:
On 19 February 2018 at 17:11, Ned Batchelder <n...@nedbatchelder.com> wrote:
On 2/19/18 10:39 AM, Paul Moore wrote:
I'm curious - How would you explain Python's "variables" to someone
who knows how C variables work, in a way that ensures
On 2/19/18 10:39 AM, Paul Moore wrote:
On 19 February 2018 at 15:18, Ned Batchelder <n...@nedbatchelder.com> wrote:
On 2/19/18 9:54 AM, Steven D'Aprano wrote:
On Mon, 19 Feb 2018 13:28:26 +, Paul Moore wrote:
[1] The most basic question, which people making such claims often can't
On 2/19/18 9:54 AM, Steven D'Aprano wrote:
On Mon, 19 Feb 2018 13:28:26 +, Paul Moore wrote:
[1] The most basic question, which people making such claims often can't
answer, is "Do you mean that values are strongly typed, or that names
are? Or did you mean that variables are, because if so
On 2/18/18 6:57 AM, bartc wrote:
On 18/02/2018 11:45, Ned Batchelder wrote:
Let's not go down this path yet again. We've heard it all before.
Bart: stop it. Everyone else: stop it. :)
Well, this was a rare instance of someone admitting that a simple and
smaller codebase has benefits
On 2/18/18 6:33 AM, bartc wrote:
On 18/02/2018 01:39, Chris Angelico wrote:
On Sun, Feb 18, 2018 at 12:31 PM, bartc wrote:
On 18/02/2018 00:45, Chris Angelico wrote:
On Sun, Feb 18, 2018 at 11:13 AM, bartc wrote:
It's text, but it is an intermediate or
On 2/15/18 9:35 AM, Chris Angelico wrote:
On Thu, Feb 15, 2018 at 2:40 PM, Oleg Korsak
wrote:
Hi. While hearing about GIL every time... is there any real reason why CAS
doesn't help to solve this problem?
https://en.wikipedia.org/wiki/Compare-and-swap
On 2/13/18 6:41 PM, Etienne Robillard wrote:
Hello everyone,
Django-hotsauce 1.0 commercial edition (LTS) is now available for
preorder :)
Checkout: https://www.livestore.ca/product/django-hotsauce/
I'm also looking for expert Django and Python programmers to test and
review the design and
On 1/30/18 3:58 PM, Etienne Robillard wrote:
Hi Ned,
Le 2018-01-30 à 15:14, Ned Batchelder a écrit :
I'm curious what you had to change for PyPy? (Unless it's a Py2/Py3
thing as Chris mentions.)
Please take a look at the changesets:
https://bitbucket.org/tkadm30/libschevo/commits
On 1/30/18 4:08 PM, Chris Angelico wrote:
On Wed, Jan 31, 2018 at 7:58 AM, Etienne Robillard<tkad...@yandex.com> wrote:
Hi Ned,
Le 2018-01-30 à 15:14, Ned Batchelder a écrit :
I'm curious what you had to change for PyPy? (Unless it's a Py2/Py3 thing
as Chris mentions.)
Please take
On 1/30/18 2:35 PM, Etienne Robillard wrote:
Hi,
I managed to patch Schevo and Durus to run under PyPy 5.9. However,
I'm afraid the changes is breaking Python 2.7 compatibility.
I'm curious what you had to change for PyPy? (Unless it's a Py2/Py3
thing as Chris mentions.)
I'm not sure how
On 1/27/18 3:15 PM, Jason Qian via Python-list wrote:
HI
I am a string that contains \r\n\t
[Ljava.lang.Object; does not exist*\r\n\t*at com.livecluster.core.tasklet
I would like it print as :
[Ljava.lang.Object; does not exist
tat com.livecluster.core.tasklet
It looks like
On 1/22/18 3:22 AM, ken...@gameofy.com wrote:
I'm using exec() to run a (multi-line) string of python code. If an
exception occurs, I get a traceback containing a stack frame for the
string. I've labeled the code object with a "file name" so I can
identify it easily, and when I debug, I
Ned Batchelder <n...@nedbatchelder.com> added the comment:
I can confirm that 3.5.5rc1 fixes the problem I had.
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
On 1/23/18 8:48 AM, kushal bhattacharya wrote:
On Tuesday, January 23, 2018 at 7:05:02 PM UTC+5:30, bartc wrote:
On 23/01/2018 13:23, kushal bhattacharya wrote:
On Wednesday, January 17, 2018 at 4:34:23 PM UTC+5:30, kushal bhattacharya
wrote:
Hi,
Is there any python framework or any tool as
On 1/22/18 3:22 AM, ken...@gameofy.com wrote:
(BTW, I've written a simple secure eval())
You have accurately guessed our interest! Would you mind starting a new
thread to show us your simple secure eval?
--Ned.
--
https://mail.python.org/mailman/listinfo/python-list
On 1/17/18 2:45 PM, Chris Angelico wrote:
On Thu, Jan 18, 2018 at 6:28 AM, Ned Batchelder <n...@nedbatchelder.com> wrote:
You'll have to replace random.choice() with
random.choice(list(...)), since you can't random.choice from a set.
Side point: why can't you? You can random.sample from
On 1/17/18 9:29 AM, leutrim.kal...@gmail.com wrote:
Hello everyone,
I am implementing a time-dependent Recommender System which applies BPR
(Bayesian Personalized Ranking), where Stochastic Gradient Ascent is used to
learn the parameters of the model. Such that, one iteration involves
On 1/16/18 2:19 PM, Larry Martell wrote:
On Tue, Jan 16, 2018 at 12:00 PM, Larry Martell wrote:
Looking for 2.7 docs on read.encode - googling did not turn up anything.
Specifically, looking for the supported options for base64, and how to
specify them, e.g.
On 1/14/18 9:57 PM, Dan Stromberg wrote:
On Sun, Jan 14, 2018 at 3:01 PM, Peng Yu wrote:
Hi,
I see the following usage of list comprehension can generate a
generator. Does anybody know where this is documented? Thanks.
Here's the (a?) generator expression PEP:
Ned Batchelder <n...@nedbatchelder.com> added the comment:
(For clarity)
The problem is that 3.5.4 adds the current directory to sys.path when running a
subdirectory's __main__.py. No other version of Python does this.
--
___
Python tracke
New submission from Ned Batchelder <n...@nedbatchelder.com>:
The issue that I reported in https://bugs.python.org/issue29723 is now
affecting 3.5.4:
```
$ pwd
/Users/ned/foo
$ tree syspathmain
syspathmain
└── __main__.py
0 directories, 1 file
$ cat syspathmain/__main__.py
import sys
On 1/11/18 8:21 PM, bartc wrote:
On 11/01/2018 23:23, Chris Angelico wrote:
On Fri, Jan 12, 2018 at 10:11 AM, bartc wrote:
I'm almost ready to plonk you, but I think there is still SOME value
in your posts. But please, stop denigrating what you don't understand.
And
On 1/11/18 10:23 AM, Chris Angelico wrote:
On Fri, Jan 12, 2018 at 12:38 AM, bartc wrote:
On 11/01/2018 05:16, Michael Torrie wrote:
On 01/10/2018 01:13 PM, bartc wrote:
Yes the link didn't have the simple examples I hoped for. How's this:
-
On 1/1/18 1:49 PM, Niles Rogoff wrote:
On Mon, 01 Jan 2018 10:42:58 -0800, breamoreboy wrote:
On Monday, January 1, 2018 at 10:14:59 AM UTC, wxjm...@gmail.com wrote:
Le lundi 1 janvier 2018 08:35:53 UTC+1, Lawrence D’Oliveiro a écrit :
On Monday, January 1, 2018 at 7:52:48 AM UTC+13, Paul
On 12/31/17 8:15 PM, Wu Xi wrote:
def neighbours(point):
x,y = point
yield x + 1 , y
yield x - 1 , y
yield x , y + 1
yield x , y - 1 #this is proof that life can emerge
inside of computers and cellular automatons,
yield x + 1 , y + 1
On 12/28/17 6:43 AM, jorge.conr...@cptec.inpe.br wrote:
Hi,
I would like to know if there is a goto command or something similar
that I can use in Python.
Python does not have a goto statement. You have to use structured
statements: for, while, try/except, yield, return, etc.
If you
On 12/17/17 10:29 AM, Peng Yu wrote:
Hi,
I would like to extract "a...@efg.hij.xyz". But it only shows ".hij".
Does anybody see what is wrong with it? Thanks.
$ cat main.py
#!/usr/bin/env python
# vim: set noexpandtab tabstop=2 shiftwidth=2 softtabstop=-1 fileencoding=utf-8:
import re
On 12/15/17 2:03 PM, Skip Montanaro wrote:
SpamBayes (http://www.spambayes.org/) has languished for quite awhile,
in part because nobody is around who can put together a Windows
installer. Unfortunately, most users are on Windows and have to work
around problems caused by the march of time and
On 12/5/17 7:16 PM, Steve D'Aprano wrote:
> compile('f"{spam} {eggs}"', '', 'single')
$ python3.6
Python 3.6.3 (default, Octâ 4 2017, 06:03:25)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
Type "help", "copyright", "credits" or "license" for more
On 12/4/17 9:13 AM, Rick Johnson wrote:
> Perhaps it's not politically correct for me to say this, but
> i've never been one who cared much about political
> correctness, so i'm just going to say it...
Cecil, feel free to ignore the rest of Rick's message.â His messages are
famous for their
On 12/4/17 4:36 AM, Cecil Westerhof wrote:
> I have a script that was running perfectly for some time. It uses:
> array = [elem for elem in output if 'CPU_TEMP' in elem]
>
> But because output has changed, I have to check for CPU_TEMP at the
> beginning of the line. What would be the best way
On 12/7/17 9:02 PM, Python wrote:
Can you please explain to me
Really, you just have to ignore him.
--Ned.
--
https://mail.python.org/mailman/listinfo/python-list
On 12/7/17 2:41 PM, Ethan Furman wrote:
On 12/07/2017 11:23 AM, Ned Batchelder wrote:
On 12/7/17 1:28 PM, Ethan Furman wrote:
--> identity('spam', 'eggs', 7)
('spam', 'eggs', 7)
I don't see why this last case should hold. Why does the function
take more than one argument? And if it d
On 12/7/17 1:28 PM, Ethan Furman wrote:
The simple answer is No, and all the answers agree on that point.
It does beg the question of what an identity function is, though.
My contention is that an identity function is a do-nothing function
that simply returns what it was given:
-->
After a certain point, the only thing you can do with a troll is ignore
them.
--Ned.
--
https://mail.python.org/mailman/listinfo/python-list
On 12/5/17 7:16 PM, Steve D'Aprano wrote:
compile('f"{spam} {eggs}"', '', 'single')
$ python3.6
Python 3.6.3 (default, Oct 4 2017, 06:03:25)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
On 12/4/17 10:41 PM, Rick Johnson wrote:
I think we've demonstrated the slicing semantics well.
Indeed. And i never questioned this aspect. I merely wanted
to inform the lurkers that the else-clause was handling a
non-action, and therefore, could be omitted.
Your original statement sounded
On 12/4/17 9:31 PM, Rick Johnson wrote:
On Monday, December 4, 2017 at 7:47:20 PM UTC-6, Ned Batchelder wrote:
[...]
Here are details filled in:
$ python3.6
Python 3.6.3 (default, Oct 4 2017, 06:03:25)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
On 12/4/17 8:03 PM, Rick Johnson wrote:
On Monday, December 4, 2017 at 6:13:19 PM UTC-6, Chris Angelico wrote:
[...]
Ahhh, I see how it is. You didn't run the code, ergo you
don't understand it. Makes perfect sense. :)
Being that Terry didn't offer any declarations or defintions
for his
On 12/4/17 9:13 AM, Rick Johnson wrote:
Perhaps it's not politically correct for me to say this, but
i've never been one who cared much about political
correctness, so i'm just going to say it...
Cecil, feel free to ignore the rest of Rick's message. His messages are
famous for their
On 12/4/17 4:36 AM, Cecil Westerhof wrote:
I have a script that was running perfectly for some time. It uses:
array = [elem for elem in output if 'CPU_TEMP' in elem]
But because output has changed, I have to check for CPU_TEMP at the
beginning of the line. What would be the best way to
On 11/27/17 1:57 PM, bartc wrote:
> On 27/11/2017 17:41, Chris Angelico wrote:
>> On Tue, Nov 28, 2017 at 2:14 AM, bartc wrote:
>>> JPEG uses lossy compression. The resulting recovered data is an
>>> approximation of the original.
>>
>> Ah but it is a perfect representation of
On 11/27/17 8:13 AM, jaya.bir...@gmail.com wrote:
> Please let me know anyone aware about the issue
>
>
> Traceback (most recent call last):
> File "testrunner.py", line 447, in
> testrunner_obj.main()
> File "testrunner.py", line 433, in main
> self.result()
> File "testrunner.py", line 310, in
On 11/27/17 7:54 AM, Cai Gengyang wrote:
> Input :
>
> count = 0
>
> if count < 5:
>print "Hello, I am an if statement and count is", count
>
> while count < 10:
>print "Hello, I am a while and count is", count
>count += 1
>
> Output :
>
> Hello, I am an if statement and count is 0
>
On 11/27/17 1:57 PM, bartc wrote:
On 27/11/2017 17:41, Chris Angelico wrote:
On Tue, Nov 28, 2017 at 2:14 AM, bartc wrote:
JPEG uses lossy compression. The resulting recovered data is an
approximation of the original.
Ah but it is a perfect representation of the JPEG
On 11/27/17 7:54 AM, Cai Gengyang wrote:
Input :
count = 0
if count < 5:
print "Hello, I am an if statement and count is", count
while count < 10:
print "Hello, I am a while and count is", count
count += 1
Output :
Hello, I am an if statement and count is 0
Hello, I am a while and
On 11/27/17 8:13 AM, jaya.bir...@gmail.com wrote:
Please let me know anyone aware about the issue
Traceback (most recent call last):
File "testrunner.py", line 447, in
testrunner_obj.main()
File "testrunner.py", line 433, in main
self.result()
File "testrunner.py", line 310, in result
result
On 11/25/17 5:05 PM, wojtek.m...@gmail.com wrote:
> Hi, my goal is to obtain an interpreter that internally
> uses UCS-2. Such a simple code should print 65535:
>
>import sys
>print sys.maxunicode
>
> This is enabled in Windows, but I want the same in Linux.
> What options have I pass to
On 11/25/17 5:05 PM, wojtek.m...@gmail.com wrote:
> Hi, my goal is to obtain an interpreter that internally
> uses UCS-2. Such a simple code should print 65535:
>
>import sys
>print sys.maxunicode
>
> This is enabled in Windows, but I want the same in Linux.
> What options have I pass to
On 11/25/17 5:05 PM, wojtek.m...@gmail.com wrote:
Hi, my goal is to obtain an interpreter that internally
uses UCS-2. Such a simple code should print 65535:
import sys
print sys.maxunicode
This is enabled in Windows, but I want the same in Linux.
What options have I pass to the configure
On 11/24/17 5:26 PM, Richard Damon wrote:
Have you tried using U+2010 (HYPHEN) ‐. It is in the class
XID_CONTINUE (in fact it is in XID_START) so should be available.
U+2010 isn't allowed in Python 3 identifiers.
The rules for identifiers are here:
On 11/20/17 9:50 AM, Stefan Ram wrote:
Ned Batchelder <n...@nedbatchelder.com> writes:
Also, why set headers that prevent the Python-List mailing list from
archiving your messages?
I am posting to a Usenet newsgroup. I am not aware of any
"Python-List mailing list".
On 11/19/17 8:40 PM, Stefan Ram wrote:
mradul dhakad writes:
I am new to python . I am trying to generate Dynamic HTML report using
Pyhton based on number of rows selected from query .Do any one can suggest
some thing for it.
main.py
import sqlite3
conn =
On 11/16/17 1:16 AM, Saeed Baig wrote:
Hey guys I am thinking of perhaps writing a PEP to introduce constants to
Python. Something along the lines of Swift’s “let” syntax (e.g. “let pi =
3.14”).
Since I’m sort of new to this, I just wanted to ask:
- Has a PEP for this already been written? If
On 11/12/17 9:17 PM, bvdp wrote:
I'm having a conceptual mind-fart today. I just modified a bunch of code to use
"from xx import variable" when variable is a global in xx.py. But, when I
change/read 'variable' it doesn't appear to change. I've written a bit of code to show
the problem:
On 11/11/17 6:56 AM, jf...@ms4.hinet.net wrote:
I learned python start from using v3.4 and never has any v2.x experience. There is a Pypi
project "ctypesgen" I like to use, but it seems is for v2.x. (un)Fortunately I
found one of its branch on github which announced is for Python3, but
On 11/10/17 6:03 PM, Ben Finney wrote:
Ned Batchelder <n...@nedbatchelder.com> writes:
On 11/8/17 10:18 PM, Ben Finney wrote:
What has been made clear to me is that we have a long way to go in
pursuit of allowing ideas to be held at arm's length, discussed and
criticised, with r
On 11/8/17 10:18 PM, Ben Finney wrote:
How many paragraphs of close parsing are we going to twist ourselves
through, just to avoid saying, "Yeah, sorry, that went a bit far. I
didn't want to alienate you in the pursuit of a demonstration of my
own correctness."
I don't have any aim of avoiding
On 11/8/17 3:05 PM, Marko Rauhamaa wrote:
Jon Ribbens :
It is my experience of this group/list that if one disagrees with any
of you, Steve and Chris, you all rally round and gang up on that
person to insult and belittle them. This makes the atmosphere quite
hostile,
On 11/8/17 5:22 PM, Ben Finney wrote:
Jon Ribbens writes:
On 2017-11-08, Ben Finney wrote:
I also think Jon had cause to bristle somewhat at the characterisation.
I don't think Jon was attacked by Steve's remark, but I do sympathise
On 11/7/17 5:48 PM, Ben Finney wrote:
Ian Kelly writes:
Nowadays I realize and accept that this is preposterous. You cannot
criticize an idea without also criticizing the people who are attached
to that idea.
Maybe so. Does that mean we must not criticise ideas? Later
On 11/6/17 8:05 AM, Jon Ribbens wrote:
On 2017-11-06, Chris Angelico wrote:
If you start with the assumption that "intuitively obvious" doesn't
actually mean "intuitively obvious" but actually means something
completely different, then your statement definitely means
On 11/1/17 5:29 PM, Chris Angelico wrote:
On Thu, Nov 2, 2017 at 8:23 AM, Ned Batchelder <n...@nedbatchelder.com> wrote:
On 11/1/17 5:12 PM, Alexey Muranov wrote:
Hello,
what do you think about the idea of replacing "`else`" with "`then`" in
the contexts of `for`
On 11/1/17 5:12 PM, Alexey Muranov wrote:
Hello,
what do you think about the idea of replacing "`else`" with "`then`"
in the contexts of `for` and `try`?
It seems clear that it should be rather "then" than "else." Compare
also "try ... then ... finally" with "try ... else ... finally".
On 11/1/17 4:17 PM, MRAB wrote:
On 2017-11-01 19:26, Ned Batchelder wrote:
From David Beazley
(https://twitter.com/dabeaz/status/925787482515533830):
>>> a = 'n'
>>> b = 'ñ'
>>> sys.getsizeof(a)
50
>>> sys.getsizeof(b)
From David Beazley (https://twitter.com/dabeaz/status/925787482515533830):
>>> a = 'n'
>>> b = 'ñ'
>>> sys.getsizeof(a)
50
>>> sys.getsizeof(b)
74
>>> float(b)
Traceback (most recent call last):
File "", line 1, in
ValueError: could not convert string to
On 10/31/17 1:23 PM, Stefan Ram wrote:
Ok, here's a report on me seing non-breaking spaces in
posts in this NG. I have written this report so that you
can see that it's not my newsreader that is converting
something, because there is no newsreader involved.
You've worded this as if
On 11/1/17 1:25 PM, Stefan Ram wrote:
I started to collect some code snippets:
Sleep one second
__import__( "time" ).sleep( 1 )
Get current directory
__import__( "os" ).getcwd()
Get a random number
__import__( "random" ).random()
And so on. You get the idea.
However,
On 10/31/17 12:45 PM, John Smith wrote:
If we keep the current implementation as is, perhaps the documentation
should at least be altered ?
John, it looks like you are responding to a Python-Dev message, but on
this list, somehow...
--Ned.
--
On 10/31/17 12:29 PM, Stefan Ram wrote:
Ned Batchelder <n...@nedbatchelder.com> writes:
However you solve it, do yourself a favor and write a function to
encapsulate it:
It is always a good solution to encapsulate a pattern into
a function. So I agree that this is a good sugg
On 10/31/17 11:29 AM, Neil Cerutti wrote:
On 2017-10-31, Ganesh Pal wrote:
Here is my solution
values = '||' + '||'.join(map(str, value_list)) + '||'
values
'||1||2||3||4||56||s||'
I am joining the elements at the beginning and end of the list
using '+' operator any
On 10/29/17 3:09 PM, Alberto Riva wrote:
On 10/29/2017 02:13 PM, Rick Johnson wrote:
Alberto Riva wrote:
Rick Johnson wrote:
Alberto Riva wrote:
[...]
In a language like Lisp
Python is nothing like Lisp, and for good reason!
I would disagree with this. Actually, it's the most Lisp-
On 10/29/17 10:18 AM, Alberto Riva wrote:
Hello,
I'm wondering if there is a way of writing a function that causes a
return from the function that called it. To explain with an example,
let's say that I want to exit my function if a dict does not contain a
given key. I could write:
def
201 - 300 of 1157 matches
Mail list logo