Re: Inclusion of of python and python libraries licensed with BSD- 3 clause license in proprietary software

2017-04-12 Thread Abhishek Kumar
On Wednesday, 12 April 2017 07:12:27 UTC+5:30, Steve D'Aprano wrote: > On Wed, 12 Apr 2017 06:35 am, Abhishek Kumar wrote: > > > Hello, > > > > I tried finding the answer but even the lawyers in my town have no idea > > Where is your town? > > > > about it and searching the web leaved me

[issue29694] race condition in pathlib mkdir with flags parents=True

2017-04-12 Thread Armin Rigo
Armin Rigo added the comment: Update: a review didn't show any other similar problems (pathlib.py is a thin layer after all). Applied the fix and test (x2.diff) inside PyPy. -- ___ Python tracker

Re: download redtube video - Free

2017-04-12 Thread grownbetterwe
在 2008年9月22日星期一 UTC+8下午6:39:10,uomioc...@gmail.com写道: > download redtube video > . > . > . > ***CLICK HERE > http://vids365.cn/download-redtube-video > * > . > . > . > . > . > . > . > . > . > . > . > . > download redtube video You may also try Allavsoft to

Re: Python and the need for speed

2017-04-12 Thread Steven D'Aprano
On Tue, 11 Apr 2017 21:10:56 -0700, Rick Johnson wrote: > high level languages like Python should make it difficult, if not > impossible, to write sub- > optimal code (at least in the blatantly obvious cases). You mean that Python should make it impossible to write: near_limit = []

Re: Python and the need for speed

2017-04-12 Thread Ian Kelly
On Tue, Apr 11, 2017 at 8:08 PM, Steve D'Aprano wrote: > Comprehensions may have been around for a decade or two in Haskell, but most > older languages don't have them. I'm pretty sure Java doesn't. Java does not have comprehensions per se, but the Streams API

Re: CPython Class variable exposed to Python is altered.

2017-04-12 Thread Vincent Vande Vyvre
Le 12/04/17 à 08:57, Vincent Vande Vyvre a écrit : Hi, Learning CPython, I've made this simple exercice, a module test which contains an object Test. The object Test has an attribute name, fixed at instanciation. So, I try my code with a script: ---

Re: Python and the need for speed

2017-04-12 Thread Gregory Ewing
Paul Rubin wrote: Or you could look at the past 50 years(!) of Lisp and Scheme compilers some of which produce very good code, ask what Python features can't be straightforwardly transliterated into Lisp to use those compilers, Lisp and Scheme are much less dynamic than Python. The problem of

CPython Class variable exposed to Python is altered.

2017-04-12 Thread Vincent Vande Vyvre
Hi, Learning CPython, I've made this simple exercice, a module test which contains an object Test. The object Test has an attribute name, fixed at instanciation. So, I try my code with a script: --- from test import Test for n in ("The name", "Foo",

[issue29994] site.USER_SITE is None for Windows embeddable Python 3.6

2017-04-12 Thread Brecht Machiels
Brecht Machiels added the comment: I see. In that case I think pip should be able to handle the case when site.USER_SITE is None. I have created a ticket here: https://github.com/pypa/pip/issues/4437. I am using the embeddable Python what's it intended for, to make a self-contained

[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2017-04-12 Thread Frank Blankenburg
Changes by Frank Blankenburg : -- nosy: +FrankBlabu ___ Python tracker ___ ___

What is the difference between x[:]=y and x=y[:]?

2017-04-12 Thread jfong
I have a list of list and like to expand each "list element" by appending a 1 and a 0 to it. For example, from "lr = [[1], [0]]" expand to "lr = [[1,1], [0,1], [1,0], [0,0]]". The following won't work: Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)] on

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread INADA Naoki
INADA Naoki added the comment: When task.cancel() called, CancelledError is thrown to coro2. But coro2 doesn't call `yield from` after task.cancel(). So the exception is never raised. If you add `yield from` after `task.cancel()`, the script runs expected. --- $ cat at.py import asyncio as a

[issue13285] signal module ignores external signal changes

2017-04-12 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Ping? I'll try to implement this in cysignals (which is more difficult than doing it in CPython because I cannot access all internals of the Python signal module). -- ___ Python tracker

[issue30050] Please provide a way to disable the warning printed if the signal module's wakeup fd overflows

2017-04-12 Thread STINNER Victor
STINNER Victor added the comment: > One way that writing to the wakeup fd can fail is if the pipe or socket's > buffer is already full, in which case we get EWOULDBLOCK or WSAEWOULDBLOCK. Is it a theorical question or did you notice the error in the wild? I mean: without sending a signal in a

[issue29178] Adding bytes.frombuffer(byteslike) constructor

2017-04-12 Thread INADA Naoki
INADA Naoki added the comment: FYI, Tornado 4.5b switched buffer implementation from deque-of-bytes to bytearray like asyncio. I sent PR for fixing "unreleased memoryview". https://github.com/tornadoweb/tornado/pull/2008 This is common pitfall when implementing buffer. --

[issue30021] Add examples for re.escape()

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: docs@python -> serhiy.storchaka ___ Python tracker ___

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

2017-04-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I mean mentioning fork(), which people usually don't call directly, is not necessary, so, indeed, a note isn't necessary. -- ___ Python tracker

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

2017-04-12 Thread STINNER Victor
New submission from STINNER Victor: When reviewing the issue #30030, it reminded me that the random module "doesn't support fork": after fork, the parent and the child produce the same "random" number sequence. I suggest to add a quick note about that: not a warning, just a note, as a

[issue30030] Simplify _RandomNameSequence

2017-04-12 Thread STINNER Victor
STINNER Victor added the comment: After reviewing the change, I created the issue #30051: "Document that the random module doesn't support fork". -- ___ Python tracker

Re: Python and the need for speed

2017-04-12 Thread alister
On Tue, 11 Apr 2017 16:31:16 -0700, Rick Johnson wrote: > On Tuesday, April 11, 2017 at 9:56:45 AM UTC-5, Steve D'Aprano wrote: >> On Tue, 11 Apr 2017 07:56 pm, Brecht Machiels wrote: >> > On 2017-04-11 08:19:31 +, Steven D'Aprano said: >> > >> > I understand that high performance was never a

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1233 ___ Python tracker ___ ___

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

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is worth documenting. Even if multiprocessing reseeds the module-global random generator, it doesn't reseed other instances of Random. -- ___ Python tracker

Re: What is the difference between x[:]=y and x=y[:]?

2017-04-12 Thread jfong
Peter Otten at 2017/4/12 UTC+8 PM 4:41:36 wrote: > jf...@ms4.hinet.net wrote: > > Assuming both x and y are lists > > x[:] = y > > replaces the items in x with the items in y while > > > x = y[:] > > makes a copy of y and binds that to the name x. In both cases x and y remain > different

[issue30049] Don't cache tp_iternext

2017-04-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Some operations cache the value of the tp_iternext slot and call it in a loop. But calling tp_iternext can run arbitrary code, release GIL and change the tp_iternext slot in the same or other thread. This can leads to visible behavior difference, such as

Re: What is the difference between x[:]=y and x=y[:]?

2017-04-12 Thread alister
On Wed, 12 Apr 2017 01:08:07 -0700, jfong wrote: > I have a list of list and like to expand each "list element" by > appending a 1 and a 0 to it. For example, from "lr = [[1], [0]]" expand > to "lr = [[1,1], [0,1], [1,0], [0,0]]". > > The following won't work: > > Python 3.4.4

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread INADA Naoki
INADA Naoki added the comment: This behavior is documented as: https://docs.python.org/3.6/library/asyncio-task.html#asyncio.Task.cancel > Unlike Future.cancel(), this does not guarantee that the task will be > cancelled: the exception might be caught and acted upon, delaying > cancellation

[issue30050] Please provide a way to disable the warning printed if the signal module's wakeup fd overflows

2017-04-12 Thread Nathaniel Smith
Nathaniel Smith added the comment: I haven't noticed the error in the wild because I don't use set_wakeup_fd on Linux/MacOS, because of this issue :-). But on MacOS literally all it would take is to receive two signals in quick succession, or to receive one signal at a moment when someone has

Re: CPython Class variable exposed to Python is altered.

2017-04-12 Thread Peter Otten
Vincent Vande Vyvre wrote: > Le 12/04/17 à 10:51, Peter Otten a écrit : >> Vincent Vande Vyvre wrote: >> >>> Le 12/04/17 à 08:57, Vincent Vande Vyvre a écrit : Hi, Learning CPython, I've made this simple exercice, a module test which contains an object Test. The

Re: Python and the need for speed

2017-04-12 Thread bart4858
On Wednesday, 12 April 2017 07:48:57 UTC+1, Steven D'Aprano wrote: > On Tue, 11 Apr 2017 21:10:56 -0700, Rick Johnson wrote: > > > high level languages like Python should make it difficult, if not > > impossible, to write sub- > > optimal code (at least in the blatantly obvious cases). > >

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

2017-04-12 Thread STINNER Victor
STINNER Victor added the comment: > I'm not sure that's necessary. Do you mean that adding a note is not necessary? Or proposing a solution in the note? -- ___ Python tracker

[issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown

2017-04-12 Thread STINNER Victor
STINNER Victor added the comment: I dislike _Py_SET_FINALIZED and _Py_SET_ONCE name. I prefer to mention an "initialization" because it's a common pattern in programming and it is known that it only requires to be done once. _PY_ONCEVAR_INIT() macro is unusual: it only evaluate the second

[issue30047] Typos in Doc/library/select.rst

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3e0f1fc4e0ffcfcc706015fa3d67c262948ef171 by Serhiy Storchaka (NAKAMURA Osamu) in branch 'master': bpo-30047: Fix a typo in Doc/library/select.rst (#1086) https://github.com/python/cpython/commit/3e0f1fc4e0ffcfcc706015fa3d67c262948ef171

[issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What if use the term "singleton"? It includes "initialize once" and "finalize at shutdown" meanings. _Py_INIT_SINGLETON() or _Py_SET_SINGLETON()? -- ___ Python tracker

[issue30049] Don't cache tp_iternext

2017-04-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___

Re: CPython Class variable exposed to Python is altered.

2017-04-12 Thread Vincent Vande Vyvre
Le 12/04/17 à 10:51, Peter Otten a écrit : Vincent Vande Vyvre wrote: Le 12/04/17 à 08:57, Vincent Vande Vyvre a écrit : Hi, Learning CPython, I've made this simple exercice, a module test which contains an object Test. The object Test has an attribute name, fixed at instanciation. So, I

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

2017-04-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure that's necessary. fork() is a low-level primitive, people can/should use multiprocessing.Process instead, which does re-seed the PRNG. -- nosy: +pitrou ___ Python tracker

[issue29694] race condition in pathlib mkdir with flags parents=True

2017-04-12 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1232 ___ Python tracker ___

[issue29995] re.escape() escapes too much

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka dependencies: +Add examples for re.escape() ___ Python tracker

Re: What is the difference between x[:]=y and x=y[:]?

2017-04-12 Thread Peter Otten
jf...@ms4.hinet.net wrote: Assuming both x and y are lists x[:] = y replaces the items in x with the items in y while x = y[:] makes a copy of y and binds that to the name x. In both cases x and y remain different lists, but in only in the second case x is rebound. This becomes relevant

[issue30050] Please provide a way to disable the warning printed if the signal module's wakeup fd overflows

2017-04-12 Thread Nathaniel Smith
New submission from Nathaniel Smith: When a wakeup fd is registered via signal.set_wakeup_fd, then the C level signal handler writes a byte to the wakeup fd on each signal received. If this write fails, then it prints an error message to the console. Some projects use the wakeup fd as a way

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

2017-04-12 Thread STINNER Victor
Changes by STINNER Victor : -- assignee: -> docs@python components: +Documentation nosy: +docs@python, rhettinger, serhiy.storchaka ___ Python tracker

Re: CPython Class variable exposed to Python is altered.

2017-04-12 Thread Vincent Vande Vyvre
Le 12/04/17 à 11:47, Peter Otten a écrit : Vincent Vande Vyvre wrote: No, no warning. For the truth, this code is copy-pasted from the doc. https://docs.python.org/3.5//extending/newtypes.html#adding-data-and-methods-to-the-basic-example But the example expects objects (the big O), not

Re: Python and the need for speed

2017-04-12 Thread Marko Rauhamaa
Paul Rubin : > I'd be interested to know how to open a disk file asynchronously in a > single-threaded Python program under Linux. As far as I can tell there > is no way to do it. Traditionally, disk access in Linux has been considered nonblocking. There is AIO, but that

Re: Python and the need for speed

2017-04-12 Thread Marko Rauhamaa
bart4...@gmail.com: > On Wednesday, 12 April 2017 07:48:57 UTC+1, Steven D'Aprano wrote: >> Here's another example: >> >> answer = 0 >> for i in range(10): >> answer += 1 >> >> instead of >> >> answer = 10 >> >> So... how exactly does the compiler prohibit stupid code? >

[issue30049] Don't cache tp_iternext

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1231 ___ Python tracker ___ ___

Re: CPython Class variable exposed to Python is altered.

2017-04-12 Thread Peter Otten
Vincent Vande Vyvre wrote: > Le 12/04/17 à 08:57, Vincent Vande Vyvre a écrit : >> Hi, >> >> Learning CPython, I've made this simple exercice, a module test which >> contains an object Test. >> >> The object Test has an attribute name, fixed at instanciation. >> >> So, I try my code with a

Re: Python and the need for speed

2017-04-12 Thread Brecht Machiels
On 2017-04-11 14:56:33 +, Steve D'Aprano said: On Tue, 11 Apr 2017 07:56 pm, Brecht Machiels wrote: Hey! This random, ignorant blogger has feelings too! :-) Hi, and welcome! Sorry, I wasn't *specifically* referring to you, except in the sense that you aren't a compiler expert. That's

[issue29694] race condition in pathlib mkdir with flags parents=True

2017-04-12 Thread Armin Rigo
Armin Rigo added the comment: https://github.com/python/cpython/pull/1089 (I fixed the problem with my CLA check. Now https://cpython-devguide.readthedocs.io/pullrequest.html#licensing says "you can ask for the CLA check to be run again" but doesn't tell how to do that, so as far as I can

PyDev 5.7.0 Released

2017-04-12 Thread Fabio Zadrozny
PyDev 5.7.0 Release Highlights --- * **Important** PyDev now requires Java 8 and Eclipse 4.6 (Neon) onwards. * PyDev 5.2.0 is the last release supporting Eclipse 4.5 (Mars). * **PyLint** * The PyLint integration is much improved. * Working along with the PyDev

[issue30052] URL Quoting page links to function Bytes instead of defintion

2017-04-12 Thread Cheryl Sabella
New submission from Cheryl Sabella: On the URL Quoting page, the following line: `string may be either a str or a bytes.` Has the `str` link to: https://docs.python.org/3/library/stdtypes.html#str But the `bytes` link to: https://docs.python.org/3/library/functions.html#bytes Should the

[issue30053] Problems building with --enable-profiling on macOS

2017-04-12 Thread Brecht Machiels
New submission from Brecht Machiels: The python.exe produced during the build process is somehow broken: $ ./python.exe -S Killed: 9 Strangely, it works when run from gdb: $ gdb -args ./python.exe -S GNU gdb (GDB) 7.12.1 Copyright (C) 2017 Free Software Foundation, Inc.

[issue30053] Problems building with --enable-profiling on macOS

2017-04-12 Thread Brecht Machiels
Changes by Brecht Machiels : Added file: http://bugs.python.org/file46799/make.txt ___ Python tracker ___

[issue30053] Problems building with --enable-profiling on macOS

2017-04-12 Thread Brecht Machiels
Changes by Brecht Machiels : Added file: http://bugs.python.org/file46800/make_gcc.txt ___ Python tracker ___

[issue13285] signal module ignores external signal changes

2017-04-12 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: I have a preliminary implementation (in the cysignals package) at https://github.com/sagemath/cysignals/pull/53 -- ___ Python tracker

[issue30027] test_xml_etree and test_xml_etree_c fail due to AssertionError: unhandled warning DeprecationWarning

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 65c5b096ac2c6608d296f1603cd4792086108c95 by Serhiy Storchaka in branch '2.7': bpo-30027: Fix Py3k warnings in test_xml_etree. (#1065) https://github.com/python/cpython/commit/65c5b096ac2c6608d296f1603cd4792086108c95 --

[issue30027] test_xml_etree and test_xml_etree_c fail due to AssertionError: unhandled warning DeprecationWarning

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30017] zlib.error: Error -2 while flushing: inconsistent stream state

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4c0d9ea995da595e90e08813b89510de59907802 by Serhiy Storchaka in branch 'master': bpo-30017: Allowed calling the close() method of the zip entry writer object (#1041)

[issue30056] RuntimeWarning: invalid value encountered in maximum/minimum

2017-04-12 Thread Amy
New submission from Amy: I just updated to numpy 1.12.1 and am getting this Runtime Warning when using numpy.minimum or numpy.maximum: RuntimeWarning: invalid value encountered in maximum Prior to updating, I was using numpy 1.10.x and had no issues running numpy.minimum or numpy.maximum

XML tree to a pandas dataframe

2017-04-12 Thread David Shi via Python-list
What is the best way to convert XML document into a pandas dataframe? Regards. David -- https://mail.python.org/mailman/listinfo/python-list

[issue30055] Missed testcleanup in decimal.rst

2017-04-12 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +1236 ___ Python tracker ___ ___

Re: Python and the need for speed

2017-04-12 Thread Michael Torrie
On 04/12/2017 03:33 AM, Brecht Machiels wrote: > However, rinohtype is located in a very different niche and it would > greatly benefit a lot from a speed boost. Rendering the Sphinx > documentation (311 pages) takes almost 10 minutes on my i7, which is > simply too long given the available

Re: Python and the need for speed

2017-04-12 Thread Michael Torrie
On 04/11/2017 06:38 PM, Paul Rubin wrote: > Grant Edwards writes: >> If there are now other Python implementations (e.g. MicroPython) with >> C APIs that differ from CPython, then it seems like it is no longer >> redundant to say "the CPython API". > > Perhaps there

[issue30055] Missed testcleanup in decimal.rst

2017-04-12 Thread Marco Buttu
New submission from Marco Buttu: The testsetup in Doc/library/decimal.rst is not enough for isolating the tests in respect to the other rst files. Currently we have the following testsetup, without a testcleanup: .. testsetup:: * import decimal import math from decimal import

Re: Python and the need for speed

2017-04-12 Thread Brecht Machiels
On 2017-04-12 14:46:45 +, Michael Torrie said: On 04/12/2017 03:33 AM, Brecht Machiels wrote: However, rinohtype is located in a very different niche and it would greatly benefit a lot from a speed boost. Rendering the Sphinx documentation (311 pages) takes almost 10 minutes on my i7,

Re: Python and the need for speed

2017-04-12 Thread Terry Reedy
On 4/11/2017 8:40 PM, Paul Rubin wrote: Mikhail V writes: Just my curiosity, I've always been intersted in such question: are devs still writing extensions in C, I mean type in C code? Yes. Aren't they using some translator or IDE which at lest hides the brackets and

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2017-04-12 Thread Julian Taylor
Julian Taylor added the comment: The api looks good to me. Works fine in numpy. -- nosy: +jtaylor ___ Python tracker ___

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2017-04-12 Thread STINNER Victor
STINNER Victor added the comment: "I don't see any reason why not to.": Ok, I created the issue #30054. -- ___ Python tracker ___

Re: Python and the need for speed

2017-04-12 Thread Ben Bacarisse
Steve D'Aprano writes: > On Wed, 12 Apr 2017 03:39 am, Paul Rubin wrote: > >> I still do my everyday stuff in Python and I'd like to get more >> conversant with stuff like numpy, but it feels like an old-fashioned >> language these days. > > "Old fashioned"? With

Re: Python and the need for speed

2017-04-12 Thread Rustom Mody
On Wednesday, April 12, 2017 at 7:09:04 PM UTC+5:30, Ben Bacarisse wrote: > Steve D'Aprano writes: > > > On Wed, 12 Apr 2017 03:39 am, Paul Rubin wrote: > > > >> I still do my everyday stuff in Python and I'd like to get more > >> conversant with stuff like numpy, but it feels like an

[issue30054] Expose tracemalloc C API to track/untrack memory blocks

2017-04-12 Thread STINNER Victor
New submission from STINNER Victor: The issue #26530 added a private C API to manually track/untrack memory blocks in tracemalloc. I was just validated by Julian Taylor who confirms that the API works as expected: http://bugs.python.org/issue26530#msg291551 So I propose to make the 3 newly

external process not terminating

2017-04-12 Thread Larry Martell
I have an app (using 2.7) that processes requests. When a request of type "A" is received I need to start an external process. When a request of type "B" is received I need to check and see if that external process has completed or not and then do some stuff depending on if it has or not. The

[issue29791] print documentation: flush is also a keyword argument

2017-04-12 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +1235 ___ Python tracker ___ ___

[issue29791] print documentation: flush is also a keyword argument

2017-04-12 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: -> patch review type: enhancement -> behavior versions: +Python 3.5, Python 3.7 ___ Python tracker

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2017-04-12 Thread STINNER Victor
STINNER Victor added the comment: Julian Taylor: "The api looks good to me. Works fine in numpy." Cool! Should it be made public in that case? (Remove _ prefix and document it.) -- ___ Python tracker

[issue26530] tracemalloc: add C API to manually track/untrack memory allocations

2017-04-12 Thread Julian Taylor
Julian Taylor added the comment: I don't see any reason why not to. -- ___ Python tracker ___ ___

[issue30054] Expose tracemalloc C API to track/untrack memory blocks

2017-04-12 Thread Julian Taylor
Julian Taylor added the comment: I am not sure if _PyTraceMalloc_GetTraceback really needs to be a public function. Exposing the tracing information should probably just go over python interfaces. -- ___ Python tracker

Re: Python and the need for speed

2017-04-12 Thread bart4858
On Wednesday, 12 April 2017 12:56:32 UTC+1, Jussi Piitulainen wrote: > bartc writes: > > > These are straightforward language enhancements. > > FYI, the question is not how to optimize the code but how to prevent the > programmer from writing stupid code in the first place. Someone > suggested

[issue30054] Expose tracemalloc C API to track/untrack memory blocks

2017-04-12 Thread STINNER Victor
STINNER Victor added the comment: What's the status in numpy? Is the current numpy release able to use CPython 3.6 tracemalloc private functions? -- ___ Python tracker

[issue30054] Expose tracemalloc C API to track/untrack memory blocks

2017-04-12 Thread Julian Taylor
Julian Taylor added the comment: With this changeset it would: https://github.com/numpy/numpy/pull/8885 -- ___ Python tracker ___

Re: Python and the need for speed

2017-04-12 Thread Jussi Piitulainen
bart4...@gmail.com writes: > On Wednesday, 12 April 2017 12:56:32 UTC+1, Jussi Piitulainen wrote: >> bartc writes: >> > >> > These are straightforward language enhancements. >> >> FYI, the question is not how to optimize the code but how to prevent >> the programmer from writing stupid code in

[issue30056] RuntimeWarning: invalid value encountered in maximum/minimum

2017-04-12 Thread R. David Murray
R. David Murray added the comment: Numpy is not part of the python standard library. You should report this issue to the numpy bug tracker, which appears to be here: https://github.com/numpy/numpy/issues. Or perhaps first ask the numpy community if this is really a bug: the new version

Re: closing image automatically in for loop , python

2017-04-12 Thread Frank Miles
On Wed, 12 Apr 2017 04:18:45 -0700, Masoud Afshari wrote: > filename ="Ex_resample" +'_sdf_'+ str(n)+'.dat' > with open(filename, 'rb') as f: #read binary file data = np.fromfile(f, > dtype='float64', count=nx*ny) #float64 for Double precision float numbers > Ex = np.reshape(data, [ny, nx],

How to pd.read_csv into a DataFrame with multiple seperators?

2017-04-12 Thread David Shi via Python-list
Have a look at this example. http://www.ebi.ac.uk/ena/data/warehouse/search?query=%22geo_circ(-0.587,-90.5713,170)%22=sequence_release=text How to pd.read_csv into a DataFrame with multiple seperators? Regards. David -- https://mail.python.org/mailman/listinfo/python-list

[issue30057] signal.signal should check tripped signals

2017-04-12 Thread Jeroen Demeyer
New submission from Jeroen Demeyer: There is a race condition in calling signal.signal() if the signal arrives while (or right before) signal.signal() is being executed: the function signal.signal(sig, action) marks the signal "sig" as not tripped. Because of this, signals can get lost.

Re: Swiss Ephemeris

2017-04-12 Thread jmp
On 04/10/2017 07:29 AM, Deborah Swanson wrote: Fully recognizing that most of what you wrote was tongue-in-cheek, I just want to say that regardless of the wonders of modern medicine, it's a pity they learn so little about successful medicines other than their own. In other academic scientific

Re: Python and the need for speed

2017-04-12 Thread Jussi Piitulainen
bart4...@gmail.com writes: > On Wednesday, 12 April 2017 10:57:10 UTC+1, bart...@gmail.com wrote: >> On Wednesday, 12 April 2017 07:48:57 UTC+1, Steven D'Aprano wrote: > >> > for i in range(10): >> > answer += 1 > >> > So... how exactly does the compiler prohibit stupid code? > >>

Re: Python and the need for speed

2017-04-12 Thread bart4858
On Wednesday, 12 April 2017 10:57:10 UTC+1, bart...@gmail.com wrote: > On Wednesday, 12 April 2017 07:48:57 UTC+1, Steven D'Aprano wrote: > > for i in range(10): > > answer += 1 > > So... how exactly does the compiler prohibit stupid code? > And this lookup happens for every loop

[issue30017] zlib.error: Error -2 while flushing: inconsistent stream state

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1234 ___ Python tracker ___ ___

closing image automatically in for loop , python

2017-04-12 Thread Masoud Afshari
Dear all I have several *.sfd files which created by a simulation code. I wrote a program containing a for Loop which reads each time one .sfd file and plot the requested Parameters. I have two request: 1- my Problem is that for Showing successive Images in for Loop I have to Close the

Re: IOError: [Errno 12] Not enough space

2017-04-12 Thread LnT
On Wednesday, April 12, 2017 at 11:13:22 AM UTC+5:30, LnT wrote: > Hello eryk sun, > Thanks so much for your input. > > could you please advice. > 1) Any workaround for this issue ? > 2) is it good to report issue in Windows OS help desk ? > > Regards, > LnT > > > > On Wednesday, April 12,

Re: What is the difference between x[:]=y and x=y[:]?

2017-04-12 Thread Peter Otten
jf...@ms4.hinet.net wrote: > Peter Otten at 2017/4/12 UTC+8 PM 4:41:36 wrote: >> jf...@ms4.hinet.net wrote: >> >> Assuming both x and y are lists >> >> x[:] = y >> >> replaces the items in x with the items in y while >> >> >> x = y[:] >> >> makes a copy of y and binds that to the name x. In

Re: XML tree to a pandas dataframe

2017-04-12 Thread Chris Angelico
On Thu, Apr 13, 2017 at 12:54 AM, David Shi via Python-list wrote: > What is the best way to convert XML document into a pandas dataframe? > Regards. > David I don't know. What's the least painful way to gouge out my eyes with a rusty fork? You're going to need to know

[issue30047] Typos in Doc/library/select.rst

2017-04-12 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: This needs backport, which I will do later today. Thanks. -- assignee: docs@python -> Mariatta nosy: +Mariatta stage: -> backport needed versions: +Python 3.7 ___ Python tracker

Re: Python and the need for speed

2017-04-12 Thread bart4858
On Wednesday, 12 April 2017 16:04:53 UTC+1, Brecht Machiels wrote: > On 2017-04-12 14:46:45 +, Michael Torrie said: > It would be great if you could run the benchmark I mention in my first > link and share the results. Highly appreciated! Were you ever able to isolate what it was that's

[issue30059] No documentation for C type Py_Ellipsis

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm wondering if it is worth to add a separate section for Ellipsis at the same level as "Slice Objects", but in the same file. See for example "Instance Method Objects" and "Method Objects" in method.rst. -- nosy: +serhiy.storchaka

Re: IOError: [Errno 12] Not enough space

2017-04-12 Thread Irmen de Jong
On 12-4-2017 7:54, LnT wrote: > > Hi Irmen, > > you may please find full log @ https://pastebin.mozilla.org/9018753 I have no idea what I'm looking at. But my initial response was wrong, see the reply by eryk sun; your error has nothing to do with disk space but rather, a lack of system

[issue30058] Buffer overflow in kqueue.control()

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1237 ___ Python tracker ___ ___

[issue30058] Buffer overflow in kqueue.control()

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch presumably fixes the issue. But since this is *BSD specific I can't even check that it is compiled. -- stage: -> patch review ___ Python tracker

HOT LIST

2017-04-12 Thread Jack
Hi Hope you doing great! Greeting from Niche Soft Solutions. I would like to present our topnotch consultants currently available. Please have a look at the below hot list of Niche Soft Solutions

[issue30057] signal.signal should check tripped signals

2017-04-12 Thread Jeroen Demeyer
Changes by Jeroen Demeyer : Added file: http://bugs.python.org/file46802/fix30057-py3.patch ___ Python tracker ___

  1   2   >