Re: Bigotry and hate speech on the python mailing list

2017-04-17 Thread Ben Finney
Wildman via Python-list writes: > "The seriousness of the charge mandates that we investigate > this. Even though there is no evidence, the seriousness of > the charge is what matters." > --Tom Foley (D) Speaker of the House That sounds right to me, provided one reads

Re: Static typing [was Re: Python and the need for speed]

2017-04-17 Thread Gregory Ewing
Steve D'Aprano wrote: I'm not sure why the Cython devs maintain this is not a JIT compiler. Perhaps I misunderstand something. A JIT compiler works by observing the actual values taken on by variables at run time, and if it notices that a particular variable seems to always have a particular

Re: Bigotry and hate speech on the python mailing list

2017-04-17 Thread Ben Finney
Ethan Furman writes: > You mean all the non-religious people? No, I don't mean that. > So you're okay with respectfully making people of faith feel > unwelcome? No, I'm not okay with that. As I said privately to you, the examples you cite do not demonstrate disrespect to

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-04-17 Thread larsonreever
larsonreever added the comment: Otherwise, py8601 (https://bitbucket.org/micktwomey/pyiso8601/) looks pretty popular and well maintained (various committers, started in 2012, last commit in 2016). I don't think that we should add the iso8601 module to the stdlib, but merge iso8601 "features"

Re: Bigotry and hate speech on the python mailing list

2017-04-17 Thread breamoreboy
On Monday, April 17, 2017 at 10:11:58 AM UTC+1, Rurpy wrote: > A couple weeks ago a frequent poster here (Steve D'Aprano) called another > participant an "ugly american" [*1]. This was followed just a couple weeks > later with another post from Mr. D'Aprano attacking a participant as "an old >

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread breamoreboy
On Tuesday, April 18, 2017 at 2:09:19 AM UTC+1, Paul Rubin wrote: > Ben Bacarisse writes: > > ? I get "AttributeError: 'itertools.dropwhile' object has no attribute > > 'next'" from your example. > > Hmm, .next() worked ok for me in Python 2.7.5. Not sure what happened. > Maybe something went

Re: Bigotry and hate speech on the python mailing list

2017-04-17 Thread Marko Rauhamaa
Rustom Mody : > On Tuesday, April 18, 2017 at 6:18:06 AM UTC+5:30, Ethan Furman wrote: >> You mean all the non-religious people? >> >> Because some of your signatures don't feel welcoming to people of >> faith: > > Thanks Ethan for bullseyeing the problem to the

[issue12414] getsizeof() on code objects is wrong

2017-04-17 Thread Dong-hee Na
Dong-hee Na added the comment: I am a newcomer who is interesting with contributing CPython project. This issue could be the first challenging issue for me. It looks like we need to multiply the number of co_extra and return the result. This approach is right and can I proceed this issue?

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread Marko Rauhamaa
Ben Bacarisse : > Python opts for > > while True: > c = sys.stdin.read(1) > if c != ' ': break I opt for that in C and bash as well. In fact, when I start writing a loop, I first type: while True: Once it is done, I might notice that the loop

Re: Bigotry and hate speech on the python mailing list

2017-04-17 Thread Rustom Mody
On Tuesday, April 18, 2017 at 6:18:06 AM UTC+5:30, Ethan Furman wrote: > On 04/17/2017 03:23 PM, Ben Finney wrote: > > Paul Rubin writes: > >> Rurpy writes: > > >>> A couple weeks ago a frequent poster here (Steve D'Aprano) > >>> called another participant an "ugly american" > >> > >> Oh stop

Re: Static typing [was Re: Python and the need for speed]

2017-04-17 Thread Steve D'Aprano
On Mon, 17 Apr 2017 08:52 pm, Steve D'Aprano wrote: > but research does continue into using gradual typing for optimizations: > > http://dl.acm.org/citation.cfm?id=2069175 Another interesting research project into speeding up Jython using type hints:

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread Marko Rauhamaa
Gregory Ewing : > Marko Rauhamaa wrote: >> What I notice in my numbers is that about one half of my while loops >> are "while True", and about a third of my loops are while loops. > > Out of curiosity, what proportion of your 'while True' loops are > infinite? (I.e.

[issue29428] Doctest documentation unclear about multi-line fixtures

2017-04-17 Thread Jim DeLaHunt
Jim DeLaHunt added the comment: Bump. Could I get a few more eyes looking at the current state of https://github.com/python/cpython/pull/45/ ? * @bitdancer made some suggestions. I accepted some, and replied to others where I think we should keep looking for common ground. I'd like to see

Re: Bigotry and hate speech on the python mailing list

2017-04-17 Thread Rurpy via Python-list
On 04/17/2017 08:19 PM, Wildman via Python-list wrote: > On Tue, 18 Apr 2017 08:23:34 +1000, Ben Finney wrote: >> Paul Rubin writes: >>> Rurpy writes: A couple weeks ago a frequent poster here (Steve D'Aprano )

[issue30031] Improve queens demo (use argparse and singular form)

2017-04-17 Thread Louie Lu
Louie Lu added the comment: Pavlo, you are right, making the argument have backward compatible is good. String quote I'll prefer `'` more than `"`. -- ___ Python tracker

Re: Unable to use Python IDLE after downloading the application

2017-04-17 Thread Nathan Ernst
Off topic, but I find it a little annoying that the default Windows installer links to the 32-bit installer (and there's no adjacent 64-bit installer link) - you have to dive into various links to get the 64-bit installer. Seeing as 64-bit Windows is now the norm, it should be the default. (It is

Re: Bigotry and hate speech on the python mailing list

2017-04-17 Thread Rurpy via Python-list
On 04/17/2017 04:38 AM, Ben Finney wrote: > Rurpy via Python-list writes: > >> A couple weeks ago a frequent poster here (Steve D'Aprano >> ) called another participant an "ugly >> american" [*1]. > > He gave no explicit reference, and so I

Re: Unable to use Python IDLE after downloading the application

2017-04-17 Thread Terry Reedy
On 4/17/2017 5:06 PM, ASHISH A wrote: Hi Team, I have a 64 bit system with Windows 801 Pro OS. I tried to install Python 3.6.1 from the below link : https://www.python.org/downloads/ It automatically downloaded that 32 bit Python application and tried to launch IDLE (32 bit). I could not

Re: Bigotry and hate speech on the python mailing list

2017-04-17 Thread Wildman via Python-list
On Tue, 18 Apr 2017 08:23:34 +1000, Ben Finney wrote: > Paul Rubin writes: > >> Rurpy writes: >> > A couple weeks ago a frequent poster here (Steve D'Aprano >> > ) called another participant an "ugly >> > american" >> >> Oh

[issue30049] Don't cache tp_iternext

2017-04-17 Thread Josh Rosenberg
Josh Rosenberg added the comment: I'm having a hard time thinking of legitimate cases where replacing __next__ mid-iteration is a thing. Doing so retroactively on the class (so it changes all outstanding iterators, no matter what state they're in) seems dubious at best, and it wouldn't be

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread eryk sun
On Tue, Apr 18, 2017 at 1:37 AM, MRAB wrote: > In Python 3 it's: > > c = next(itertools.dropwhile( > lambda c: c==' ', > iter(lambda: sys.stdin.read(1),None) > )) iter's sentinel should be an empty string. --

[issue30040] new empty dict can be more small

2017-04-17 Thread Josh Rosenberg
Josh Rosenberg added the comment: For the record, legitimate case when many empty dicts are created, and few are populated, is the collections-free approach to defaultdict(dict): mydict.setdefault(key1, {})[key2] = val For, say, 100 unique key1s, and 10,000 total key1/key2 pairs, you'd

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread MRAB
On 2017-04-18 02:09, Paul Rubin wrote: Ben Bacarisse writes: ? I get "AttributeError: 'itertools.dropwhile' object has no attribute 'next'" from your example. Hmm, .next() worked ok for me in Python 2.7.5. Not sure what happened. Maybe something went wrong with my

Re: Buffers and pointers (Py3.4)

2017-04-17 Thread Rob Gaddi
On 04/17/2017 02:49 PM, eryk sun wrote: On Mon, Apr 17, 2017 at 5:58 PM, Rob Gaddi wrote: buffertype = c_uint8 * size return addressof(buffertype.from_buffer(buf, offset)) works but is inefficient and woefully inelegant. A lot of the cost there is in

[issue29950] Rename SlotWrapperType to WrapperDescriptorType

2017-04-17 Thread Dong-hee Na
Dong-hee Na added the comment: I am a newcomer who is interesting with contributing CPython project. This issue looks easy to solve. Can I proceed this issue? -- nosy: +corona10 ___ Python tracker

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread Paul Rubin
Ben Bacarisse writes: > ? I get "AttributeError: 'itertools.dropwhile' object has no attribute > 'next'" from your example. Hmm, .next() worked ok for me in Python 2.7.5. Not sure what happened. Maybe something went wrong with my paste. Oh well. > Coming from the lazy

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread Ben Bacarisse
Paul Rubin writes: > Ben Bacarisse writes: >> c = sys.stdin.read(1) >> while c == ' ': >> c = sys.stdin.read(1) (for the record: I was not suggesting this was how you'd do it but how you'd be forced to do it in some languages) > c =

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread bartc
On 18/04/2017 01:23, Paul Rubin wrote: Ben Bacarisse writes: c = sys.stdin.read(1) while c == ' ': c = sys.stdin.read(1) c = itertools.dropwhile( lambda c: c==' ', iter(lambda: sys.stdin.read(1),None) ).next() I tried this but it doesn't like

Re: Bigotry and hate speech on the python mailing list

2017-04-17 Thread Ethan Furman
On 04/17/2017 03:23 PM, Ben Finney wrote: Paul Rubin writes: Rurpy writes: A couple weeks ago a frequent poster here (Steve D'Aprano) called another participant an "ugly american" Oh stop trolling. Paul, that is uncalled for. The charge of bigotry is not to be lightly dismissed, and we

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread Ben Bacarisse
Marko Rauhamaa writes: > Ben Bacarisse : > >> Marko Rauhamaa writes: >>> What I notice in my numbers is that about one half of my while loops >>> are "while True", and about a third of my loops are while loops. >> >> I fo[u]nd the

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread Paul Rubin
Ben Bacarisse writes: > c = sys.stdin.read(1) > while c == ' ': > c = sys.stdin.read(1) c = itertools.dropwhile( lambda c: c==' ', iter(lambda: sys.stdin.read(1),None) ).next() -- https://mail.python.org/mailman/listinfo/python-list

[issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows

2017-04-17 Thread Eryk Sun
Eryk Sun added the comment: Hiding the console is required often enough that a keyword-only parameter for this would be useful. Other platforms could simply ignore it, in contrast to writing platform-dependent code that passes startupinfo. Note that this option would also hide the window of

[issue30031] Improve queens demo (use argparse and singular form)

2017-04-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please focus on the task at hand and don't worry about PEP-8ing the existing code. -- nosy: +rhettinger ___ Python tracker

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread Gregory Ewing
Marko Rauhamaa wrote: What I notice in my numbers is that about one half of my while loops are "while True", and about a third of my loops are while loops. Out of curiosity, what proportion of your 'while True' loops are infinite? (I.e. no break, return or raise in the loop.) -- Greg --

Re: Bigotry and hate speech on the python mailing list

2017-04-17 Thread Ben Finney
Paul Rubin writes: > Rurpy writes: > > A couple weeks ago a frequent poster here (Steve D'Aprano > > ) called another participant an "ugly > > american" > > Oh stop trolling. Paul, that is uncalled for. The charge of bigotry

Re: Unable to use Python IDLE after downloading the application

2017-04-17 Thread eryk sun
On Mon, Apr 17, 2017 at 9:06 PM, ASHISH A wrote: > > I could not launch IDLE and it gave me an error saying DLL file missing > (attached snapshot). python-list doesn't send attachments. Please do your best to paraphrase error messages that can't be pasted as plain text.

Re: Buffers and pointers (Py3.4)

2017-04-17 Thread eryk sun
On Mon, Apr 17, 2017 at 5:58 PM, Rob Gaddi wrote: > buffertype = c_uint8 * size > return addressof(buffertype.from_buffer(buf, offset)) > > works but is inefficient and woefully inelegant. A lot of the cost there is in creating buffertype, but why do you need

[issue30091] DeprecationWarning: invalid escape sequence: Only appears on first run

2017-04-17 Thread Jon Dufresne
Jon Dufresne added the comment: Understood. Thanks for the response. I'll have to keep this in mind as I debug these warnings in the future. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

Re: Unable to use Python IDLE after downloading the application

2017-04-17 Thread ASHISH A
Hi Team, I also tried installing the 64 bit Python and now i get the attached snapshot as error message, Regards Ashish On Mon, Apr 17, 2017 at 11:06 PM, ASHISH A wrote: > Hi Team, > > I have a 64 bit system with Windows 801 Pro OS. I tried to install Python > 3.6.1

Re: Unable to use Python IDLE after downloading the application

2017-04-17 Thread ASHISH A
PFA the snapshot of the error message.. Regards Ashish On Mon, Apr 17, 2017 at 11:06 PM, ASHISH A wrote: > Hi Team, > > I have a 64 bit system with Windows 801 Pro OS. I tried to install Python > 3.6.1 from the below link : > https://www.python.org/downloads/ > > It

Unable to use Python IDLE after downloading the application

2017-04-17 Thread ASHISH A
Hi Team, I have a 64 bit system with Windows 801 Pro OS. I tried to install Python 3.6.1 from the below link : https://www.python.org/downloads/ It automatically downloaded that 32 bit Python application and tried to launch IDLE (32 bit). I could not launch IDLE and it gave me an error saying

Re: GPUs with various tools

2017-04-17 Thread Paul Rubin
Jeffrey Layton writes: > I'm working with Continuum's Accelerate and I'm slowly learning PyCUDA > but I'm looking for something that's already coded. TensorFlow has good Python bindings. That's probably the best way to get started. --

Re: Static typing [was Re: Python and the need for speed]

2017-04-17 Thread Paul Rubin
Steve D'Aprano writes: > On the other hand, there's Cython. Cython claims *not* to be a JIT compiler, One of the uses of "JIT compiler" these days is what's sometimes called a tracing JIT, like PyPy or LuaJIT or the Javascript flavor-of-the-week. That means it

Re: Bigotry and hate speech on the python mailing list

2017-04-17 Thread Paul Rubin
Rurpy writes: > A couple weeks ago a frequent poster here (Steve D'Aprano > ) called another participant an "ugly > american" Oh stop trolling. Ugly American was a 1950s thing, now just amusing. And context matters. Steven, please try to be a little

[issue30091] DeprecationWarning: invalid escape sequence: Only appears on first run

2017-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is how Python works. This can't be changed without changing the compiler, the format of .pyc files (for saving warnings) and importing system. And this may slow down normal compilation due to generating warnings for saving them in .pyc files. I don't

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread R. David Murray
R. David Murray added the comment: Right. Which is why you get an error if you try to use an empty directory as if it was a maildir :) create=True creates the *directory* and initializes it. That seems clear to me, and exactly what I would expect. "The mailbox" is the directory. If it

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread Sviatoslav Sydorenko
Sviatoslav Sydorenko added the comment: > create a Maildir folder in a temporary directory: > > with tempfile.TemporaryDirectory() as tmpdir: > with mailbox.Maildir(os.path.join(tmpdir, 'mail'), create=True) as > box: > ... Yeah, I came up with the same solution. It

[issue30091] DeprecationWarning: invalid escape sequence: Only appears on first run

2017-04-17 Thread Jon Dufresne
Jon Dufresne added the comment: I see. I think if the goal is for developers to see and fix these DeprecationWarnings, it would help if the warnings were reproducible without taking steps different from normal Python development. TBH, this is the first time I've ever used the -B CLI

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread Grant Edwards
On 2017-04-17, Ben Bacarisse wrote: > Marko Rauhamaa writes: > >> Terry Reedy : >> >>> On 4/17/2017 3:11 AM, Marko Rauhamaa wrote: Here's statistics from a medium-sized project of mine: while True:34

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread Mikhail V
On 17 April 2017 at 04:00, Steve D'Aprano wrote: > On Mon, 17 Apr 2017 05:49 am, Dennis Lee Bieber wrote: > >> On Mon, 17 Apr 2017 02:48:08 +1000, Steve D'Aprano >> declaimed the following: >> >>>On Sun, 16 Apr 2017 11:57 pm, bartc wrote:

Re: Buffers and pointers (Py3.4)

2017-04-17 Thread Chris Angelico
On Tue, Apr 18, 2017 at 3:58 AM, Rob Gaddi wrote: > If I were writing this as a C extension, getting that information from any > buffer object would be trivial, but that changes my project from a pure > Python wrapper using ctypes to a mixed language project

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread Marko Rauhamaa
Ben Bacarisse : > Marko Rauhamaa writes: >> What I notice in my numbers is that about one half of my while loops >> are "while True", and about a third of my loops are while loops. > > I fo[u]nd the proportion on while True: loops surprising. Is there >

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread bartc
On 17/04/2017 19:02, Ben Bacarisse wrote: Marko Rauhamaa writes: Terry Reedy : On 4/17/2017 3:11 AM, Marko Rauhamaa wrote: Here's statistics from a medium-sized project of mine: while True:34 while : 39 for ... in ...: 158

[issue29514] Add a test case that prevents magic number changes in minor releases

2017-04-17 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset d6d344d8330a5975fc102e8f275d47044294f1d1 by Łukasz Langa (Eric Appelt) in branch 'master': bpo-29514: Check magic number for bugfix release (#54) https://github.com/python/cpython/commit/d6d344d8330a5975fc102e8f275d47044294f1d1 --

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread Ben Bacarisse
Marko Rauhamaa writes: > Terry Reedy : > >> On 4/17/2017 3:11 AM, Marko Rauhamaa wrote: >>> Here's statistics from a medium-sized project of mine: >>> >>>while True:34 >>>while : 39 >>>for ... in ...: 158 >> >> As I posted

GPUs with various tools

2017-04-17 Thread Jeffrey Layton
Good afternoon, Since I just got a nice GTX 1050 card, I would like to exercise it with Python. In particular, I'm curious about tools such as SciPy, Pandas, Numpy, etc., that can take advantage of GPUs so I don't have to write any GPU code. For example, can I solve an A X = B linear problem

Buffers and pointers (Py3.4)

2017-04-17 Thread Rob Gaddi
So long as we're all feeling so concerned about speed lately... I've got a piece of hardware that allows me to call a C library that calls an ioctl() that kicks off a DMA transfer and moves data between process memory and external hardware. I would like a way to turn an arbitrary object

Re: creating vector from df.intertuples

2017-04-17 Thread Peter Otten
Richard Medina wrote: > I want to create a vector from a dataframe in a loop. Then I want to > create a new column from this vector. > > for row in df.itertuples(): > mm = str(row.t) #selecting "t" column > nn = get_sec(mm) #this function converts time to seconds >

[issue30090] Failed to build these modules: _ctypes

2017-04-17 Thread Eric V. Smith
Changes by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30090] Failed to build these modules: _ctypes

2017-04-17 Thread Emmanuel Arias
Emmanuel Arias added the comment: The problem was solution making: apt-get install libffi-dev Thanks -- ___ Python tracker ___

[issue30091] DeprecationWarning: invalid escape sequence: Only appears on first run

2017-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This warning is emitted by the compiler when it compiles string literals with invalid escape sequences. Once the source is compiled to the bytecode and saved to the .pyc file the compiler no longer involved. You can disable writing compiled bytecode by

[ANN] kubetop 17.4.17.1

2017-04-17 Thread Jean-Paul Calderone
Hello all, I'm pleased to announce the initial release of kubetop, a command-line tool in the style of top(1) for displaying current usage and activity of a Kubernetes cluster. kubetop 17.4.17.1 will format information about your Kubernetes cluster like this: kubetop - 13:02:57 Node 0 CPU%

creating vector from df.intertuples

2017-04-17 Thread Richard Medina
I want to create a vector from a dataframe in a loop. Then I want to create a new column from this vector. for row in df.itertuples(): mm = str(row.t) #selecting "t" column nn = get_sec(mm) #this function converts time to seconds df["s"] = nn #I want to add my new

[issue30091] DeprecationWarning: invalid escape sequence: Only appears on first run

2017-04-17 Thread Jon Dufresne
New submission from Jon Dufresne: After upgrading to Python 3.6, I'm working towards cleaning up "DeprecationWarning: invalid escape sequence". I've noticed that the Deprecation warning only appears on the first run. It looks like once the code is compiled to `__pycache__`, the deprecation

[issue30031] Improve queens demo (use argparse and singular form)

2017-04-17 Thread Pavlo Kapyshin
Pavlo Kapyshin added the comment: Louie Lu, thank you for the review. Different quotes were already used in file, so someone should decide which ones must be used: single or double. Regarding the -n option, I tried to be backwards compatible. Again, a decision is needed. The only place where

[issue30090] Failed to build these modules: _ctypes

2017-04-17 Thread Louie Lu
Changes by Louie Lu : -- components: +Build -Interpreter Core type: compile error -> ___ Python tracker ___

[issue30090] Failed to build these modules: _ctypes

2017-04-17 Thread Louie Lu
Louie Lu added the comment: Are you using Ubuntu or other Linux distribution? This problem is because you didn't install the dependency package. You may first try to use the instruction at devguide: http://cpython-devguide.readthedocs.io/setup.html#build-dependencies Or, assume you have

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread Marko Rauhamaa
Terry Reedy : > On 4/17/2017 3:11 AM, Marko Rauhamaa wrote: >> Here's statistics from a medium-sized project of mine: >> >>while True:34 >>while : 39 >>for ... in ...: 158 > > As I posted previously, the ratio of for-loops in the stdlib is about

[issue29041] Reference leaks on Windows

2017-04-17 Thread Zachary Ware
Zachary Ware added the comment: Here's an updated refleak run, on master as of last Thursday: test_atexit leaked [12, 12, 12] references, sum=36 test_atexit leaked [4, 6, 6] memory blocks, sum=16 test_capi leaked [6, 6, 6] references, sum=18 test_capi leaked [2, 4, 4] memory blocks, sum=10

[issue30031] Improve queens demo (use argparse and singular form)

2017-04-17 Thread Louie Lu
Louie Lu added the comment: I make some review at GitHub. Do David and Terry suggest to also fix the problem about PEP8 coding style, since this demo have many places didn't fit PEP8. -- nosy: +louielu ___ Python tracker

[issue30090] Failed to build these modules: _ctypes

2017-04-17 Thread Emmanuel Arias
New submission from Emmanuel Arias: Hello everybody, I am working with the code. I clone the repo, and make a pull upstream of github's cpython repository (master branch), and when I make: ./configure --with-pydebug && make -j build correctly but finished with this message: Failed

[issue29738] Fix memory leak in SSLSocket.getpeercert()

2017-04-17 Thread Olivier Vielpeau
Olivier Vielpeau added the comment: Thnaks for the reviews and the merge! :) -- ___ Python tracker ___ ___

[issue30089] Automatic Unload of Dynamic Library Cause Segfault

2017-04-17 Thread Chinh Nguyen
New submission from Chinh Nguyen: I'm using ctypes to access the PAM library to change a user's password. That is, using the function pam_chauthtok. This is occurring inside a python celery worker in FreeBSD. This will work the first time, the second time generates a segfault and crashes the

Re: Looping [was Re: Python and the need for speed]

2017-04-17 Thread Terry Reedy
On 4/17/2017 3:11 AM, Marko Rauhamaa wrote: Gregory Ewing : bartc wrote: Most of my loops start off as endless loops, until I can determine the actual terminating condition, and where it best goes. Interesting. My experience is quite different. Most of the loops

Re: Python's help() function is awesome

2017-04-17 Thread Terry Reedy
On 4/17/2017 5:31 AM, Steve D'Aprano wrote: If you're not using the help() command in the interactive interpreter, you're missing out on a lot. I recently discovered that help() is even cleverer than I knew. I knew it picked up on objects' doc strings, but what happens if the object doesn't

Re: Bigotry and hate speech on the python mailing list

2017-04-17 Thread Rustom Mody
On Monday, April 17, 2017 at 3:09:44 PM UTC+5:30, Marko Rauhamaa wrote: > Rurpy : > > > If I posted a remark about "dirty Chinese" (c.f. "ugly American") I > > would be (justifiably) slammed and likely ejected from the list. Or if > > claims that not understanding new tech is a product of age are

Re: Bigotry and hate speech on the python mailing list

2017-04-17 Thread Rustom Mody
On Monday, April 17, 2017 at 4:09:34 PM UTC+5:30, Ben Finney wrote: > The charge of bigotry is a strong one here, rightly so, and I think you > for taking it seriously. Will you drop that charge now? If you won't, I > think you need to show how this analysis is incorrect. On the same day that (I

[issue30051] Document that the random module doesn't support fork

2017-04-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: > os.fork() documentation contains a warning that refers to ssl > documentation where the use of OpenSSL’s internal random number > generator in forked processes is documented more detailed. > I think the same should be added for the random module. +1 It is

[issue23174] shelve.open fails with error "anydbm.error: db type could not be determined"

2017-04-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Serhiy] > Current error message looks good to me and I don't see how > it can be enhanced. I concur with Serhiy and David. -- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with David. Rather than using a temporary directory as a Maildir folder: with tempfile.TemporaryDirectory() as tmpdir: with mailbox.Maildir(tmpdir, create=True) as box: ... create a Maildir folder in a temporary directory:

Re: Static typing [was Re: Python and the need for speed]

2017-04-17 Thread Steve D'Aprano
On Mon, 17 Apr 2017 04:18 pm, Paul Rubin wrote: > Steve D'Aprano writes: >> Since it is *optional*, it is only a hint, not a fact. You can tell the >> compiler that you believe that n will be an int, but it's not guaranteed. > > The runtime could check at the entry

Re: Static typing [was Re: Python and the need for speed]

2017-04-17 Thread Steve D'Aprano
On Sun, 16 Apr 2017 02:27 pm, Steve D'Aprano wrote: > Are you aware that optional static typing CANNOT be used for optimization? I think I've over-stated that. Considerably. In other words, I was wrong. As Steve Yegge points out, dynamic languages like Smalltalk and Lisp were, back in the

Re: Bigotry and hate speech on the python mailing list

2017-04-17 Thread Ben Finney
Rurpy via Python-list writes: > A couple weeks ago a frequent poster here (Steve D'Aprano > ) called another participant an "ugly > american" [*1]. He gave no explicit reference, and so I can see why you would think he did what you describe.

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread R. David Murray
R. David Murray added the comment: Just create a subdirectory inside the tempdir to hold your Maildir folder. I think it is not worth complicating the API for this use case, since it does have a simple solution. -- versions: -Python 2.7, Python 3.5, Python 3.6

[issue30087] pdb issue with type conversion

2017-04-17 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> not a bug ___ Python tracker ___ ___

[issue30061] Check if PyObject_Size() raised an error

2017-04-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1294 ___ Python tracker ___ ___

Re: Bigotry and hate speech on the python mailing list

2017-04-17 Thread Marko Rauhamaa
Rurpy : > If I posted a remark about "dirty Chinese" (c.f. "ugly American") I > would be (justifiably) slammed and likely ejected from the list. Or if > claims that not understanding new tech is a product of age are ok, > then why can't I say disparagingly that someone "programs

[issue30076] Opcode names BUILD_MAP_UNPACK_WITH_CALL and BUILD_TUPLE_UNPACK_WITH_CALL are too long

2017-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I like the names BUILD_VAR_POSITIONAL and BUILD_VAR_KEYWORD. The downside is that this breaks relations between them and very similar opcodes BUILD_TUPLE_UNPACK and BUILD_MAP_UNPACK. The only differences between BUILD_*_UNPACK and BUILD_*_UNPACK_WITH_CALL

Bigotry and hate speech on the python mailing list

2017-04-17 Thread Rurpy via Python-list
A couple weeks ago a frequent poster here (Steve D'Aprano ) called another participant an "ugly american" [*1]. This was followed just a couple weeks later with another post from Mr. D'Aprano attacking a participant as "an old man" who can't understand new

Python's help() function is awesome

2017-04-17 Thread Steve D'Aprano
If you're not using the help() command in the interactive interpreter, you're missing out on a lot. I recently discovered that help() is even cleverer than I knew. I knew it picked up on objects' doc strings, but what happens if the object doesn't have a doc string? Let's find out! Here's a

Re: Regular Expressions, Speed, Python, and NFA

2017-04-17 Thread breamoreboy
On Friday, April 14, 2017 at 4:12:27 PM UTC+1, Malik Rumi wrote: > I am running some tests using the site regex101 to figure out the correct > regexs to use for a project. I was surprised at how slow it was, constantly > needing to increase the timeouts. I went Googling for a reason, and

Re: Hi! i need some help with a program in python on Raspberry pi3.

2017-04-17 Thread breamoreboy
On Friday, April 14, 2017 at 3:27:29 PM UTC+1, Kasper wrote: > every time i run the program i get this messeage: > > Traceback (most recent call last): > File "smartmirror.py", line 159, in get_weather > temprature2 = "%S%S" % (str(int(weather_obj['currently']['temperature'])), >

Re: write arrays to disk

2017-04-17 Thread Andre Müller
Hi, there are many possible solutions. You'll need a serialiser to convert the Python object into bytes. If you wan't to access the data from other applications, you can use json, xml or other well known formats. Json and XML is in the Python standard library. You can also use a database. As

[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2017-04-17 Thread Louie Lu
Louie Lu added the comment: I think this patch make the behavior changed. Documentation wrote that: "If create is True, the mailbox is created if it does not exist.", the current version did that exactly, it won't create subdir (tmp, new, and cur) when dir exists. The situation face here is

Re: Python Command Line Arguments

2017-04-17 Thread breamoreboy
On Saturday, April 15, 2017 at 6:45:51 PM UTC+1, Grant Edwards wrote: > On 2017-04-14, Bernd Nawothnig wrote: > > > He should switch to argparse in any case because getopt is no longer > > supported and does only receive bugfixes. > > In my book, "receiving bug fixes" means it's still supported.

Announcing SCM Workbench 0.8.6 for Git, Mercurial and Subversion

2017-04-17 Thread Barry Scott
SCM Workbench features • Support Subversion (svn), Mercurial (hg) and Git projects. • Easy to learn and use • Builtin User Guide describes the operation and features of the application. • Add project wizard can scan for all your existing projects. • All

Re: Python Command Line Arguments

2017-04-17 Thread breamoreboy
On Friday, April 14, 2017 at 2:44:09 PM UTC+1, Bernd Nawothnig wrote: > On 2017-04-13, Jason Friedman wrote: > >> I have this code which I got from https://www.tutorialspoint. > >> com/python/python_command_line_arguments.htm The example works fine but > >> when I modify it to what I need, it only

Re: Swiss Ephemeris

2017-04-17 Thread Peter Henry
Hi I hired a programmer to help to extract data for windows 10 64 Bit system You will be able generate data and use for your models, the idea is to eventually get Swiss Ephemeris working as phython file Create folder and use and drop Swedll64.dll and Swetest64.exe into same folder as

Re: Moderating the list [was: Python and the need for speed]

2017-04-17 Thread breamoreboy
On Thursday, April 13, 2017 at 10:31:22 AM UTC+1, Tim Golden wrote: > On 13/04/2017 03:39, Jason Friedman wrote: > >> > >> However, it's simply a technical fact: the thing which we moderate is the > >>> mailing list. We can control which posts make it through from the > >>> newsgroup > >>> by

Re: Merging multiple sorted sequences.

2017-04-17 Thread Andre Müller
Hi, when you have lists with different lengths and want to zip them, you should look at itertools.zip_longest Greetings Andre -- https://mail.python.org/mailman/listinfo/python-list

  1   2   >