[issue34318] Convert deprecated behavior of assertRaises() etc into errors

2018-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 77d5781835b6e0a132694ebadc22b1cbdb9913f8 by Serhiy Storchaka in branch 'master': bpo-34318: Convert deprecation warnings to errors in assertRaises() etc. (GH-8623)

[issue34415] Typo in logging.Formatter docstring

2018-08-19 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 ___ Python tracker ___

[issue34392] Add sys.isinterned()

2018-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you all for the feedback. The function is renamed to sys._is_interned() and documented as optional. -- ___ Python tracker ___

[issue34415] Typo in logging.Formatter docstring

2018-08-19 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 2e4ae8f1b3147d7f0a461b4ffdde9bcc9e6a2083 by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-34415: Updated logging.Formatter docstring. (GH-8811) (GH-8817) https://github.com/python/cpython/commit/2e4ae8f1b3147d7f0a461b4ffdde9bcc9e6a2083

[issue34415] Typo in logging.Formatter docstring

2018-08-19 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset fed871835ee54f50cabcec6239271739ed4839f5 by Vinay Sajip (Miss Islington (bot)) in branch '3.6': bpo-34415: Updated logging.Formatter docstring. (GH-8811) (GH-8816) https://github.com/python/cpython/commit/fed871835ee54f50cabcec6239271739ed4839f5

Re: printing to stdout

2018-08-19 Thread Marko Rauhamaa
richard lucassen : > As I'm new to Python, just this question: are there any unPythony > things in this code? Your code looks neat. > except IOError: > print ("[ALERT] I/O problem device 0x%x" % list_pcf[i]) Just double check that simply printing the alert is the correct recovery

Re: printing to stdout

2018-08-19 Thread Cameron Simpson
On 19Aug2018 09:32, richard lucassen wrote: This is a working script I made. It initializes the I/O expanders, then it waits for an INT from these I/O expanders on GPIO23, reads the contents and sends which bit on which chip went up or down to a fifo (and stdout for logging) As I'm new to

Re: Pylint false positives

2018-08-19 Thread Marko Rauhamaa
Steven D'Aprano : > On Sun, 19 Aug 2018 00:11:30 +0300, Marko Rauhamaa wrote: > >> In Python programming, I mostly run into closures through inner classes >> (as in Java). > > Inner classes aren't closures. At least some of the methods of inner classes are closures (or there would be no point to

Re: printing to stdout

2018-08-19 Thread richard lucassen
On Fri, 17 Aug 2018 08:31:22 +1000 Cameron Simpson wrote: > Just looking at your loop I would be inclined to just call flush once > at the bottom, _before_ the sleep() call: > > sys.stdout.flush() > > Your call; the performance difference will be small, so it tends to > come down to keeping

Re: Pylint false positives

2018-08-19 Thread Marko Rauhamaa
Chris Angelico : > On Sun, Aug 19, 2018 at 9:03 AM, Marko Rauhamaa wrote: >> Chris Angelico : >> >>> *headscratch* >>> >>> So this is okay: >>> >>> def f(): >>> for i in range(5): >>> def g(): ... >>> >>> But this isn't: >>> >>> class C: >>> for i in range(5): >>> def

[issue34318] Convert deprecated behavior of assertRaises() etc into errors

2018-08-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

Re: Pylint false positives

2018-08-19 Thread Steven D'Aprano
On Sun, 19 Aug 2018 11:43:44 +0300, Marko Rauhamaa wrote: > Steven D'Aprano : > >> On Sun, 19 Aug 2018 00:11:30 +0300, Marko Rauhamaa wrote: >> >>> In Python programming, I mostly run into closures through inner >>> classes (as in Java). >> >> Inner classes aren't closures. > > At least some of

Re: printing to stdout

2018-08-19 Thread richard lucassen
On Sun, 19 Aug 2018 19:53:04 +1000 Cameron Simpson wrote: > There are always unPythonic bits. Even after you've cleaned them all > up, since people will disagree about the finer points of Pythonicism > there will be bits both over and under cleaned. Although I do not understand what zip is

[issue26901] Argument Clinic test is broken

2018-08-19 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +8300 stage: -> patch review ___ Python tracker ___ ___

[issue34435] Missing NULL check in unicode_encode_ucs1()

2018-08-19 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : A possible NULL return on out-of-memory condition at Objects/unicodeobject.c:6835 is not handled. Reported by Svace static analyzer. -- components: Interpreter Core messages: 323762 nosy: inada.naoki, izbyshev, serhiy.storchaka, vstinner

[issue34436] Overallocation is never disabled in _PyBytes_FormatEx()

2018-08-19 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8305 stage: -> patch review ___ Python tracker ___ ___

[issue34422] __name__ not available for classes in typing module

2018-08-19 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: This is an intentional change. It would be a bad idea to use `__name__` instead of what is currently `_name`, because semantics is subtly different. Also the fact that types in typing module used to be actual class objects was an implementation detail

[issue34422] __name__ not available for classes in typing module

2018-08-19 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Oh I just re-read my comment and there are so many typos that I will write a new one, sorry. -- ___ Python tracker ___

Re: printing to stdout

2018-08-19 Thread Cameron Simpson
On 19Aug2018 18:10, richard lucassen wrote: On Sun, 19 Aug 2018 10:11:08 -0400 Joel Goldstick wrote: Your allusion to pointers is misguided. Python is not like C or assembler. You don't, and don't need to know where objects are stored. Names are assigned to reference data objects I'll

Re: Connection refused when tryign to run bottle/flask web framweworks

2018-08-19 Thread Ian Kelly
On Sun, Aug 19, 2018, 1:47 PM Νίκος wrote: > Hello, > > i just installed bottle and flask web frameworks in my CentOS environment > but i canno get it working even with the simpleste xample. The coonection > is refused always. > > from bottle import route, run, template > > @route('/hello/') >

Re: How to multiply dictionary values with other values based on the dictionary's key?

2018-08-19 Thread Steven D'Aprano
On Sun, 19 Aug 2018 05:29:46 -0700, giannis.dafnomilis wrote: > With your help I have arrived at this point: I have the dictionary > varsdict (size 5) as below > > KeyTypeSize Value > FEq_(0,_0,_0,_0) float11.0 > FEq_(0,_0,_1,_1)

Re: Writing bytes to stdout reverses the bytes

2018-08-19 Thread Cameron Simpson
On 20Aug2018 00:31, Steven D'Aprano wrote: When I write bytes to stdout, why are they reversed? [steve@ando ~]$ python2.7 -c "print('\xfd\x84\x04\x08')" | hexdump 000 84fd 0804 000a 005 [steve@ando ~]$ python3.5 -c "import sys; sys.stdout.buffer.write(b'\xfd \x84\x04\x08\n')" |

Re: Writing bytes to stdout reverses the bytes

2018-08-19 Thread Steven D'Aprano
On Mon, 20 Aug 2018 00:31:35 +, Steven D'Aprano wrote: > When I write bytes to stdout, why are they reversed? Answer: they aren't, use hexdump -C. Thanks to all replies! -- Steven D'Aprano "Ever since I learned about confirmation bias, I've been seeing it everywhere." -- Jon Ronson --

Re: Writing bytes to stdout reverses the bytes

2018-08-19 Thread Chris Angelico
On Mon, Aug 20, 2018 at 11:31 AM, Grant Edwards wrote: > On 2018-08-20, Chris Angelico wrote: >> On Mon, Aug 20, 2018 at 11:12 AM, Grant Edwards >> wrote: >>> On 2018-08-20, Steven D'Aprano wrote: On Mon, 20 Aug 2018 00:31:35 +, Steven D'Aprano wrote: > When I write bytes to

[issue34435] Missing NULL check in unicode_encode_ucs1()

2018-08-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

Re: Pylint false positives

2018-08-19 Thread Marko Rauhamaa
Chris Angelico : > On Sun, Aug 19, 2018 at 11:54 PM, Marko Rauhamaa wrote: >>> 3) Every invocation of method() has to execute the class body, which >>> takes time. >> >> That's what happens with every method invocation in Python regardless. > > No. You have to execute the *class body*. Every

Re: Writing bytes to stdout reverses the bytes

2018-08-19 Thread Chris Angelico
On Mon, Aug 20, 2018 at 10:31 AM, Steven D'Aprano wrote: > When I write bytes to stdout, why are they reversed? > > [steve@ando ~]$ python2.7 -c "print('\xfd\x84\x04\x08')" | hexdump > 000 84fd 0804 000a > 005 > > [steve@ando ~]$ python3.5 -c "import sys; sys.stdout.buffer.write(b'\xfd >

Re: Writing bytes to stdout reverses the bytes

2018-08-19 Thread Grant Edwards
On 2018-08-20, Steven D'Aprano wrote: > When I write bytes to stdout, why are they reversed? > > [steve@ando ~]$ python2.7 -c "print('\xfd\x84\x04\x08')" | hexdump > 000 84fd 0804 000a > 005 They aren't. You're being fooled by the default output format of hexdump. By default, it

Re: Writing bytes to stdout reverses the bytes

2018-08-19 Thread Grant Edwards
On 2018-08-20, Steven D'Aprano wrote: > On Mon, 20 Aug 2018 00:31:35 +, Steven D'Aprano wrote: > >> When I write bytes to stdout, why are they reversed? > > Answer: they aren't, use hexdump -C. One might think that dumping out bytes in the correct order ought to be the default format for

Re: Writing bytes to stdout reverses the bytes

2018-08-19 Thread Grant Edwards
On 2018-08-20, Chris Angelico wrote: > On Mon, Aug 20, 2018 at 11:12 AM, Grant Edwards > wrote: >> On 2018-08-20, Steven D'Aprano wrote: >>> On Mon, 20 Aug 2018 00:31:35 +, Steven D'Aprano wrote: >>> When I write bytes to stdout, why are they reversed? >>> >>> Answer: they aren't, use

Re: Writing bytes to stdout reverses the bytes

2018-08-19 Thread Ben Bacarisse
Grant Edwards writes: > On 2018-08-20, Steven D'Aprano wrote: >> On Mon, 20 Aug 2018 00:31:35 +, Steven D'Aprano wrote: >> >>> When I write bytes to stdout, why are they reversed? >> >> Answer: they aren't, use hexdump -C. > > One might think that dumping out bytes in the correct order

[issue34436] Overallocation is never disabled in _PyBytes_FormatEx()

2018-08-19 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : The condition for disabling overallocation at 225b055/Objects/bytesobject.c:822 is always false. Reported by Svace static analyzer. -- components: Interpreter Core messages: 323763 nosy: inada.naoki, izbyshev, serhiy.storchaka, vstinner priority:

[issue34435] Missing NULL check in unicode_encode_ucs1()

2018-08-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +8304 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34435] Missing NULL check in unicode_encode_ucs1()

2018-08-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +8303 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34435] Missing NULL check in unicode_encode_ucs1()

2018-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 74a307d48ef8b278c4629ca0ef2139be1c9a34e6 by Serhiy Storchaka (Alexey Izbyshev) in branch 'master': bpo-34435: Add missing NULL check to unicode_encode_ucs1(). (GH-8823)

[issue34422] __name__ not available for classes in typing module

2018-08-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Bisecting this issue revealed that this happened on commit d911e40e788fb679723d78b6ea11cabf46caed5a is the first bad commit commit d911e40e788fb679723d78b6ea11cabf46caed5a Author: Ivan Levkivskyi Date: Sat Jan 20 11:23:59 2018 + bpo-32226:

[issue34422] __name__ not available for classes in typing module

2018-08-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Library (Lib) -Interpreter Core nosy: +gvanrossum, levkivskyi versions: +Python 3.8 ___ Python tracker ___

[issue34435] Missing NULL check in unicode_encode_ucs1()

2018-08-19 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Thank you for merging! -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list

[issue34422] __name__ not available for classes in typing module

2018-08-19 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: This is an intentional change. It would be a bad idea to use `_name` instead of `__name__`, because semantics is subtly different. Also the fact that type in typing object used to be actual class object was an implementation detail (also typing is still

Re: printing to stdout

2018-08-19 Thread Cameron Simpson
On 19Aug2018 15:09, richard lucassen wrote: On Sun, 19 Aug 2018 19:53:04 +1000 Cameron Simpson wrote: Although I do not understand what zip is doing exactly here (I presume I switch to use pointers instead of the values), Someone else has descibed zip tersely: it pairs it the elements of 2

[issue34062] Python launcher on Windows does not work with --list or --list-paths

2018-08-19 Thread Brendan Gerrity
Change by Brendan Gerrity : -- pull_requests: +8306 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34437] print statement using \x results in improper and extra bytes

2018-08-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: You wrote: > There are 6 bytes not 4 and where did the c3, bd, and c2 come from? In Python 2, strings are byte strings, in Python 3, strings by default are Unicode text strings. You are seeing the UTF-8 representation of the text string. py>

Writing bytes to stdout reverses the bytes

2018-08-19 Thread Steven D'Aprano
When I write bytes to stdout, why are they reversed? [steve@ando ~]$ python2.7 -c "print('\xfd\x84\x04\x08')" | hexdump 000 84fd 0804 000a 005 [steve@ando ~]$ python3.5 -c "import sys; sys.stdout.buffer.write(b'\xfd \x84\x04\x08\n')" | hexdump 000 84fd 0804 000a 005 --

Re: Writing bytes to stdout reverses the bytes

2018-08-19 Thread Chris Angelico
On Mon, Aug 20, 2018 at 11:12 AM, Grant Edwards wrote: > On 2018-08-20, Steven D'Aprano wrote: >> On Mon, 20 Aug 2018 00:31:35 +, Steven D'Aprano wrote: >> >>> When I write bytes to stdout, why are they reversed? >> >> Answer: they aren't, use hexdump -C. > > One might think that dumping out

[issue34422] __name__ not available for classes in typing module

2018-08-19 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- Removed message: https://bugs.python.org/msg323770 ___ Python tracker ___ ___ Python-bugs-list

Re: printing to stdout

2018-08-19 Thread Chris Angelico
On Mon, Aug 20, 2018 at 7:55 AM, Cameron Simpson wrote: > Draw little boxes with arrows. It helps. - Michael J. Eager Draw good boxes. - DeviCat ChrisA -- https://mail.python.org/mailman/listinfo/python-list

[issue34435] Missing NULL check in unicode_encode_ucs1()

2018-08-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34435] Missing NULL check in unicode_encode_ucs1()

2018-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your PR Alexey. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

Connection refused when tryign to run bottle/flask web framweworks

2018-08-19 Thread Νίκος
Hello, i just installed bottle and flask web frameworks in my CentOS environment but i canno get it working even with the simpleste xample. The coonection is refused always. from bottle import route, run, template @route('/hello/') def index(name): return template('Hello {{name}}!',

[issue34435] Missing NULL check in unicode_encode_ucs1()

2018-08-19 Thread miss-islington
miss-islington added the comment: New changeset 1e596d3a20a1a9d1ef15218ef33795bc9e651b7a by Miss Islington (bot) in branch '3.7': bpo-34435: Add missing NULL check to unicode_encode_ucs1(). (GH-8823) https://github.com/python/cpython/commit/1e596d3a20a1a9d1ef15218ef33795bc9e651b7a

[issue34435] Missing NULL check in unicode_encode_ucs1()

2018-08-19 Thread miss-islington
miss-islington added the comment: New changeset e77cdae0f84fc390fedea1f53bbc8746d634 by Miss Islington (bot) in branch '3.6': bpo-34435: Add missing NULL check to unicode_encode_ucs1(). (GH-8823) https://github.com/python/cpython/commit/e77cdae0f84fc390fedea1f53bbc8746d634

[issue34437] print statement using \x results in improper and extra bytes

2018-08-19 Thread Nathan Benson
New submission from Nathan Benson : While writing some shellcode I uncovered an unusual bug where Python 3 seems to print out incorrect (and extra) hex bytes using the print statement with \x. Needless to say I was pulling my hair out trying to figure out why my shellcode wasn’t working.

[issue18925] select.poll.modify is not documented

2018-08-19 Thread Berker Peksag
Berker Peksag added the comment: poll.modify() is documented in both Python 2 and Python 3 docs: * https://docs.python.org/2/library/select.html#select.poll.modify * https://docs.python.org/3/library/select.html#select.poll.modify > I believe that should be "Modify a registered file

Re: printing to stdout

2018-08-19 Thread richard lucassen
On Sun, 19 Aug 2018 19:53:04 +1000 Cameron Simpson wrote: [Oops, apparently you set the Reply-To to python-list@python.org, normally that's no problem, but I did something wrong somewhere] > There are always unPythonic bits. Even after you've cleaned them all > up, since people will disagree

Re: New books by O’Reilly

2018-08-19 Thread Gene Heskett
On Saturday 18 August 2018 21:40:25 Larry Martell wrote: > https://imgur.com/gallery/tW1lwEl Larry; Here, it loaded very slow and the central window is empty. Was there supposed to be content? Or is my firefox busted? -- Cheers, Gene Heskett -- "There are four boxes to be used in defense of

Re: printing to stdout

2018-08-19 Thread Richard Lucassen
On Sun, 19 Aug 2018 12:37:18 -0400 Joel Goldstick wrote: > > I'll have another look at it, I was just searching for a clear > > explanation, but the page I found was not clear enough for me. I'll > > have to take some time for it... > > try python.org tutorial, and search for terms like names,

[issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied

2018-08-19 Thread miss-islington
miss-islington added the comment: New changeset f19579b8f1fcd2dd8ffaf3e443b09930057c01d1 by Miss Islington (bot) in branch '3.6': bpo-22057: Clarify eval() documentation (GH-8812) https://github.com/python/cpython/commit/f19579b8f1fcd2dd8ffaf3e443b09930057c01d1 --

[issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied

2018-08-19 Thread miss-islington
miss-islington added the comment: New changeset 0e1e8dbb0b99ec78f4567382428fdd46e2244d40 by Miss Islington (bot) in branch '3.7': bpo-22057: Clarify eval() documentation (GH-8812) https://github.com/python/cpython/commit/0e1e8dbb0b99ec78f4567382428fdd46e2244d40 -- nosy:

[issue25711] Rewrite zipimport from scratch

2018-08-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed issues on Windows. -- versions: +Python 3.8 -Python 3.7 ___ Python tracker ___ ___

Re: How to multiply dictionary values with other values based on the dictionary's key?

2018-08-19 Thread giannis . dafnomilis
On Sunday, August 19, 2018 at 3:53:39 AM UTC+2, Steven D'Aprano wrote: > > Unless you edit your code with Photoshop, why do you think a JPEG is a > good idea? > > That discriminates against the blind and visually impaired, who can use > screen-readers with text but can't easily read text

Re: printing to stdout

2018-08-19 Thread Joel Goldstick
On Sun, Aug 19, 2018 at 9:56 AM richard lucassen wrote: > > On Sun, 19 Aug 2018 12:02:51 +0300 > Marko Rauhamaa wrote: > > > richard lucassen : > > > As I'm new to Python, just this question: are there any unPythony > > > things in this code? > > > > Your code looks neat. > > Well, apparently

[issue18049] Re-enable threading test on OSX

2018-08-19 Thread Ronald Oussoren
Ronald Oussoren added the comment: I have a patch for making the stack sizes the same in Issue34264. -- ___ Python tracker ___ ___

[issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied

2018-08-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +8297 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied

2018-08-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +8296 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: How to multiply dictionary values with other values based on the dictionary's key?

2018-08-19 Thread Steven D'Aprano
On Sun, 19 Aug 2018 03:15:32 -0700, giannis.dafnomilis wrote: > Thank you MRAB! > > Now I can get the corresponding dictionary value A[i,j,k,l] for each key > in the varsdict dictionary. > > However how would I go about multiplying the value of each > FEq_(i,_j,_k,_l) key with the A[i,j,k,l]

Re: Pylint false positives

2018-08-19 Thread Marko Rauhamaa
Steven D'Aprano : > On Sun, 19 Aug 2018 11:43:44 +0300, Marko Rauhamaa wrote: >> At least some of the methods of inner classes are closures (or there >> would be no point to an inner class). > > [...] > > (2) Whether or not the methods of an inner class are closures depends on > the methods, not

Re: How to multiply dictionary values with other values based on the dictionary's key?

2018-08-19 Thread giannis . dafnomilis
On Sunday, August 19, 2018 at 1:42:29 PM UTC+2, Steven D'Aprano wrote: > On Sun, 19 Aug 2018 03:15:32 -0700, giannis.dafnomilis wrote: > > > Thank you MRAB! > > > > Now I can get the corresponding dictionary value A[i,j,k,l] for each key > > in the varsdict dictionary. > > > > However how would

Python Information Form

2018-08-19 Thread Suman Mupparapu
Hi Team, I am newbie to Python and glad to be part of the team. Sorry for starting with a help. Working on a creating a small information form ..and encountering issues when trying to edit the details using Python Flask and MYSQL DB. Placed the code below for your reference. Please help to fix

Re: printing to stdout

2018-08-19 Thread Richard Lucassen
On Sun, 19 Aug 2018 10:11:08 -0400 Joel Goldstick wrote: > > Well, apparently there were quite a lot of things that makes the > > code more readable I'd say. And even better. But it was indeed not > > very unPythony. OTOH, I'm not a programmer, otherwise I would have > > written this in C ;-) >

[issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt

2018-08-19 Thread Danish Prakash
Change by Danish Prakash : -- keywords: +patch pull_requests: +8301 stage: -> patch review ___ Python tracker ___ ___

[issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied

2018-08-19 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the review, Martin, and thanks for the report, Alon! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

Re: How to multiply dictionary values with other values based on the dictionary's key?

2018-08-19 Thread giannis . dafnomilis
> Do you want to modify the varsdict values in place? > > varsdict['Feq_(i,_j,_k,_l)'] *= A[i,j,k,l] > > which is a short-cut for this slightly longer version: > > temp = varsdict['Feq_(i,_j,_k,_l)'] * A[i,j,k,l] > varsdict['Feq_(i,_j,_k,_l)'] = temp > > > > If you want to leave the

Re: Pylint false positives

2018-08-19 Thread Marko Rauhamaa
Chris Angelico : > On Sun, Aug 19, 2018 at 10:28 PM, Marko Rauhamaa wrote: >> The most useful use of inner classes is something like this: >> >> class Outer: >> def method(self): >> outer = self >> >> class Inner: >> def spam(self, a, b): >>

Re: printing to stdout

2018-08-19 Thread richard lucassen
On Sun, 19 Aug 2018 12:02:51 +0300 Marko Rauhamaa wrote: > richard lucassen : > > As I'm new to Python, just this question: are there any unPythony > > things in this code? > > Your code looks neat. Well, apparently there were quite a lot of things that makes the code more readable I'd say.

Re: How to multiply dictionary values with other values based on the dictionary's key?

2018-08-19 Thread giannis . dafnomilis
Thank you MRAB! Now I can get the corresponding dictionary value A[i,j,k,l] for each key in the varsdict dictionary. However how would I go about multiplying the value of each FEq_(i,_j,_k,_l) key with the A[i,j,k,l] one? Do you have any insight in that? --

[issue25810] Python 3 documentation for eval is incorrect

2018-08-19 Thread Berker Peksag
Change by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: New books by O’Reilly

2018-08-19 Thread D'Arcy Cain
On 2018-08-18 09:40 PM, Larry Martell wrote: > https://imgur.com/gallery/tW1lwEl I think I have met the people who studied those books. -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.com --

[issue34433] cancel all other pending child futures

2018-08-19 Thread tzongw
New submission from tzongw : In `tasks.gather`, when a child future throws an exception and `return_exceptions` is False, outer future will call `set_exception` while other child futures is still running. In this case, outer future call `_GatheringFuture.cancel' first to cancel all other

[issue34434] Removal of kwargs for int() etc not described as change

2018-08-19 Thread Andy Maier
New submission from Andy Maier : Python 3.7 removed support for passing the argument to the built-in functions int(), bool(), float(), list() and tuple() as a keyword argument. This change is described in the "What's New" for 3.7 (https://docs.python.org/3/whatsnew/3.7.html) in section "API

[issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt

2018-08-19 Thread Danish Prakash
Danish Prakash added the comment: @pablogsal I would love to fix this up -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue27088] doc: select: epoll.poll: incorrect timeout units, missing maxevents

2018-08-19 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report. In the title, you mentioned epoll.poll(), but you gave the link to the poll.poll() documentation. Also, the part you quoted If timeout is given, it specifies the length of time in milliseconds which the system will wait for

Re: Pylint false positives

2018-08-19 Thread Chris Angelico
On Sun, Aug 19, 2018 at 10:28 PM, Marko Rauhamaa wrote: > Steven D'Aprano : > >> On Sun, 19 Aug 2018 11:43:44 +0300, Marko Rauhamaa wrote: >>> At least some of the methods of inner classes are closures (or there >>> would be no point to an inner class). >> >> [...] >> >> (2) Whether or not the

[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

2018-08-19 Thread Mark Harfouche
Mark Harfouche added the comment: Is there still interest in this? -- nosy: +Mark Harfouche ___ Python tracker ___ ___

Re: printing to stdout

2018-08-19 Thread Joel Goldstick
On Sun, Aug 19, 2018 at 12:16 PM Richard Lucassen wrote: > > On Sun, 19 Aug 2018 10:11:08 -0400 > Joel Goldstick wrote: > > > > Well, apparently there were quite a lot of things that makes the > > > code more readable I'd say. And even better. But it was indeed not > > > very unPythony. OTOH,

[issue34435] Missing NULL check in unicode_encode_ucs1()

2018-08-19 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +8302 stage: -> patch review ___ Python tracker ___ ___

[issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied

2018-08-19 Thread Berker Peksag
Berker Peksag added the comment: New changeset 225b05548027d55aafb11b65f6a4a2bef2f5196f by Berker Peksag in branch 'master': bpo-22057: Clarify eval() documentation (GH-8812) https://github.com/python/cpython/commit/225b05548027d55aafb11b65f6a4a2bef2f5196f --

Re: How to multiply dictionary values with other values based on the dictionary's key?

2018-08-19 Thread Steven D'Aprano
On Sun, 19 Aug 2018 03:35:24 -0700, giannis.dafnomilis wrote: > On Sunday, August 19, 2018 at 3:53:39 AM UTC+2, Steven D'Aprano wrote: [...] >> If you know absolutely for sure that the key format is ALWAYS going to >> be 'FEq_()' then you can extract the fields using slicing, like >> this: >>

[issue34433] cancel all other pending child futures

2018-08-19 Thread tzongw
Change by tzongw : -- keywords: +patch pull_requests: +8298 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

Re: Pylint false positives

2018-08-19 Thread Chris Angelico
On Sun, Aug 19, 2018 at 11:54 PM, Marko Rauhamaa wrote: > Chris Angelico : >> 2) You can't identify these objects as being of the same type (since >> they're not). > > That's a feature, not a bug. Type membership checking goes against > duck-typing. Oh, so it would be better for Python if every

[issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt

2018-08-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Content Hi @Nojima and thank you for the report. Do you mind doing a PR? If not, I can do it myself if you prefer. -- ___ Python tracker

[issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt

2018-08-19 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg323758 ___ Python tracker ___ ___ Python-bugs-list

[issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt

2018-08-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Hi @Nojima and thank you for the report. Do you mind doing a PR? If not, I can do it myself. -- nosy: +pablogsal ___ Python tracker

Re: Python Information Form

2018-08-19 Thread MRAB
On 2018-08-19 15:41, Suman Mupparapu wrote: Hi Team, I am newbie to Python and glad to be part of the team. Sorry for starting with a help. Working on a creating a small information form ..and encountering issues when trying to edit the details using Python Flask and MYSQL DB. Placed the code

Re: Writing bytes to stdout reverses the bytes

2018-08-19 Thread Grant Edwards
On 2018-08-20, Ben Bacarisse wrote: > Grant Edwards writes: > >> On 2018-08-20, Steven D'Aprano wrote: >>> On Mon, 20 Aug 2018 00:31:35 +, Steven D'Aprano wrote: >>> When I write bytes to stdout, why are they reversed? >>> >>> Answer: they aren't, use hexdump -C. >> >> One might think

Re: Writing bytes to stdout reverses the bytes

2018-08-19 Thread Chris Angelico
On Mon, Aug 20, 2018 at 12:01 PM, Grant Edwards wrote: > On 2018-08-20, Ben Bacarisse wrote: >> Grant Edwards writes: >> >>> On 2018-08-20, Steven D'Aprano wrote: On Mon, 20 Aug 2018 00:31:35 +, Steven D'Aprano wrote: > When I write bytes to stdout, why are they reversed?

Re: Python Information Form

2018-08-19 Thread dieter
Suman Mupparapu writes: > Working on a creating a small information form ..and encountering issues > when trying to edit the details using Python Flask and MYSQL DB. > > Placed the code below for your reference. Please help to fix this issue. > Let me know if you need any other details from my

[issue30717] Add unicode grapheme cluster break algorithm

2018-08-19 Thread Xiang Zhang
Change by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34423] Overflow when casting from double to time_t, and_PyTime_t.

2018-08-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34438] do_handshake stuck in ssl.py

2018-08-19 Thread David
New submission from David : Sometimes, rarely, API calls will get stuck indefinitely on ssl.py. Stack trace: response = json.loads(urllib.request.urlopen(req).read()) File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File

Re: Connection refused when tryign to run bottle/flask web framweworks

2018-08-19 Thread dieter
Νίκος writes: > i just installed bottle and flask web frameworks in my CentOS environment but > i canno get it working even with the simpleste xample. The coonection is > refused always. "connection refused" is an indication that there is no (running) server at the connection port. Unlike

  1   2   >