Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Steven D'Aprano
On Fri, 11 May 2018 05:17:59 +, Steven D'Aprano wrote: > On Fri, 11 May 2018 03:29:57 +0300, Marko Rauhamaa wrote: [...] > To answer your question from a later post: > > In what way does "while True" in the general case pretend to be an > infinite loop? Oops, sorry, that was Ian

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Steven D'Aprano
On Fri, 11 May 2018 01:51:47 +0300, Marko Rauhamaa wrote: > Paul Rubin : > >> Marko Rauhamaa writes: >>> It turns out "while True" is the most natural choice in about half of >>> the while loops. >> >> Maybe the rest would be "repeat until" if Python

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Gene Heskett
On Thursday 10 May 2018 23:21:11 Steven D'Aprano wrote: > On Thu, 10 May 2018 11:03:54 -0600, Ian Kelly wrote about proposed > > prefixes for octal: > > Personally I would have preferred the "t". > > "t" for octal, hey? > > That would be annoying if we ever get trinary literals. > > n for binary

[issue33455] test.test_posix.TestPosixSpawn::test_specify_environment fails with custom LD_LIBRARY_PATH

2018-05-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7ec8f28656ea9d84048e9b5655375c6a74a59f53 by Serhiy Storchaka (Miro Hrončok) in branch 'master': bpo-33455: Pass os.environ in test_posix::test_specify_environment. (GH-6753)

[issue33455] test.test_posix.TestPosixSpawn::test_specify_environment fails with custom LD_LIBRARY_PATH

2018-05-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +6451 ___ Python tracker ___

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Ian Kelly
On Thu, May 10, 2018 at 9:21 PM, Steven D'Aprano wrote: > On Thu, 10 May 2018 11:03:54 -0600, Ian Kelly wrote about proposed > prefixes for octal: > >> Personally I would have preferred the "t". > > "t" for octal, hey? > > That would be annoying if we ever

Re: Print Failure or success based on the value of the standalone tool

2018-05-10 Thread Cameron Simpson
On 11May2018 06:53, Ganesh Pal wrote: On Thu, May 10, 2018, 22:31 Rob Gaddi By not using os.system, it's been superseded for reasons exactly like yours. https://docs.python.org/3/library/subprocess.html is your friend. Can someone please help me understand this better

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Steven D'Aprano
On Fri, 11 May 2018 03:29:57 +0300, Marko Rauhamaa wrote: >> Now do you understand what I mean about putting the condition into the >> loop header? > > Thanks, but no thanks. The "while True" idiom beats that one hands down. Why do you think it is better to lie to the reader and tell them they

[issue15443] datetime module has no support for nanoseconds

2018-05-10 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___

[issue33463] Can namedtuple._asdict return a regular dict instead of OrderedDict?

2018-05-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___

[issue33462] reversible dict

2018-05-10 Thread Raymond Hettinger
Change by Raymond Hettinger : -- versions: +Python 3.8 ___ Python tracker ___

[issue33463] Can namedtuple._asdict return a regular dict instead of OrderedDict?

2018-05-10 Thread Raymond Hettinger
Change by Raymond Hettinger : -- versions: -Python 3.7 ___ Python tracker ___

Re: Meaning of abbreviated terms

2018-05-10 Thread T Berger
On Saturday, May 5, 2018 at 6:45:46 PM UTC-4, MRAB wrote: > On 2018-05-05 17:57, T Berger wrote: > > What does the "p" in "plist" stand for? > > Is there a python glossary that spells out the meanings of abbreviated > > terms? > > > "plist" is "property list". It's listed in the Python

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Steven D'Aprano
On Thu, 10 May 2018 22:59:03 +0300, Marko Rauhamaa wrote: > It turns out "while True" is the most natural choice in > about half of the while loops. YMMV. In my case, it is more like about one in ten. -- Steve -- https://mail.python.org/mailman/listinfo/python-list

[issue33463] Can namedtuple._asdict return a regular dict instead of OrderedDict?

2018-05-10 Thread Michael Selik
New submission from Michael Selik : Since the basic dict is now keeping insertion order, can we switch namedtuple._asdict to return a basic dict? Other than OrderedDict.move_to_end and the repr, I believe there is no compatibility issue. -- messages: 316387 nosy: selik

[issue33462] reversible dict

2018-05-10 Thread Michael Selik
New submission from Michael Selik : Now that dicts are tracking insertion order, they can be made reversible via the built-in reversed, just like OrderedDict. -- messages: 316386 nosy: selik priority: normal severity: normal status: open title: reversible dict type:

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Steven D'Aprano
On Thu, 10 May 2018 11:03:54 -0600, Ian Kelly wrote about proposed prefixes for octal: > Personally I would have preferred the "t". "t" for octal, hey? That would be annoying if we ever get trinary literals. n for binary t for octal i for trinary or should that be r for ternary? o for

[issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter

2018-05-10 Thread dplusplus
dplusplus added the comment: I am trying to build Python 3.6.5 from source, with Tcl 8.6.8 and Tk 8.6.8, and I get the same issue (Building on Ubuntu 18.04, tried with GCC 7.3 and 8.1 with same results). Run 'readelf -d` on

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Steven D'Aprano
On Thu, 10 May 2018 17:36:39 +0100, bartc wrote: > I wonder why someone would take a feature generally agreed to be a > poorly designed feature of C, and incorporate it into a new language. Because in 1991 or thereabouts, when Guido was designing the language for the first time, he thought it

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Bob van der Poel
On Thu, May 10, 2018 at 6:36 PM, Gene Heskett wrote: > On Thursday 10 May 2018 20:55:58 bartc wrote: > > > On 11/05/2018 01:25, Marko Rauhamaa wrote: > > > Chris Angelico : > > >> Octal makes a lot of sense in the right contexts. > > > > > > I think octal

[issue29204] Add code deprecations in ElementTree

2018-05-10 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- pull_requests: +6450 ___ Python tracker ___

[issue33461] json.loads(encoding=) does not emit deprecation warning.

2018-05-10 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- keywords: +patch pull_requests: +6449 stage: -> patch review ___ Python tracker ___

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Ian Kelly
On Thu, May 10, 2018 at 7:10 PM, Chris Angelico wrote: > On Fri, May 11, 2018 at 10:29 AM, Marko Rauhamaa wrote: >> Chris Angelico : >> >>> But for the loop itself, you absolutely CAN write this more logically. >>> I'll take your second

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Ian Kelly
On Tue, May 8, 2018 at 11:50 PM, Chris Angelico wrote: > On Wed, May 9, 2018 at 3:36 PM, Ian Kelly wrote: >> >> while True: >> if we_are_done(): >> break >> # do some stuff >> ... >> if error_occurred(): >> break >>

[issue33461] json.loads(encoding=) does not emit deprecation warning.

2018-05-10 Thread Matthias Bussonnier
New submission from Matthias Bussonnier : The `encoding` keyword of json.loads is ignored and deprecated. AFAICT this is since Python 3.1. Passing a value for encoding does not emit a deprecation warning. -- messages: 316384 nosy: mbussonn priority:

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Chris Angelico
On Fri, May 11, 2018 at 11:36 AM, Gene Heskett wrote: > So other than the *nix chmod, and some similar stuff in > os9/nitros9/amigados, I have never had to deal with octal. I'm sure the > security people would be pleased if another bit could be expanded into > the

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Gene Heskett
On Thursday 10 May 2018 20:55:58 bartc wrote: > On 11/05/2018 01:25, Marko Rauhamaa wrote: > > Chris Angelico : > >> Octal makes a lot of sense in the right contexts. > > > > I think octal is a historical relic from a time when people weren't > > yet comfortable with

Re: Print Failure or success based on the value of the standalone tool

2018-05-10 Thread Ganesh Pal
On Thu, May 10, 2018, 22:31 Rob Gaddi > > > By not using os.system, it's been superseded for reasons exactly like > yours. https://docs.python.org/3/library/subprocess.html is your friend. > Can someone please help me understand this better for me with a program . Will the returncode of

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Chris Angelico
On Fri, May 11, 2018 at 10:29 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> But for the loop itself, you absolutely CAN write this more logically. >> I'll take your second version as a template: >> >> def split_cmd(self, cmd): >> args = [] >>

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Chris Angelico
On Fri, May 11, 2018 at 10:25 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> Octal makes a lot of sense in the right contexts. > > I think octal is a historical relic from a time when people weren't yet > comfortable with hexadecimal. And any other

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread bartc
On 11/05/2018 01:25, Marko Rauhamaa wrote: Chris Angelico : Octal makes a lot of sense in the right contexts. I think octal is a historical relic from a time when people weren't yet comfortable with hexadecimal. It's a relic from when machines had word sizes that were

Re: Suggestion for a "data" object syntax

2018-05-10 Thread Mikhail V
On Wed, May 9, 2018 at 6:25 AM, Steven D'Aprano wrote: > On Tue, 08 May 2018 23:16:23 +0300, Mikhail V wrote: > >> but I propose Tab-separated elements. > > We already have tab-separated elements in Python. It is allowed to use > tabs between any whitespace

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Marko Rauhamaa
Chris Angelico : > But for the loop itself, you absolutely CAN write this more logically. > I'll take your second version as a template: > > def split_cmd(self, cmd): > args = [] > while (match := self.TERM_PTN.match(cmd)) is not None: >

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Marko Rauhamaa
Chris Angelico : > Octal makes a lot of sense in the right contexts. I think octal is a historical relic from a time when people weren't yet comfortable with hexadecimal. > Allowing octal literals is a Good Thing. I think it's just unavoidable mainly because of os.chmod.

[issue33351] Support compiling with clang-cl on Windows

2018-05-10 Thread Ethan Smith
Change by Ethan Smith : -- keywords: +patch pull_requests: +6448 stage: test needed -> patch review ___ Python tracker ___

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Chris Angelico
On Fri, May 11, 2018 at 8:49 AM, Marko Rauhamaa wrote: > def split_cmd(self, cmd): > args = [] > while True: > match = self.TERM_PTN.match(cmd) > if match is None: > return None, None >

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Chris Angelico
On Fri, May 11, 2018 at 8:43 AM, bartc wrote: > This is Wrong, and would have been just as obviously wrong in 1989. Having spent many years programming in C and working on Unix, I strongly disagree. This was *not* obviously wrong. It's easy to say "but look at the real world";

[issue33459] Define "tuple display" in the docs

2018-05-10 Thread Cheryl Sabella
Cheryl Sabella added the comment: Actually, 'tuple display' is in the index under 'display' and links to the last paragraph in 6.2.3. However, except for the index name, that paragraph doesn't use the phrase 'tuple display'. So it gives the definition without saying what

[issue33459] Define "tuple display" in the docs

2018-05-10 Thread R. David Murray
R. David Murray added the comment: Nope, a tuple display is not equal to a parenthesized list. For example, in: x = 1, 2, 3 1, 2, 3 is a tuple display. The parenthesis are optional in that case (in the general case it is the comma that makes the tuple, not the

[issue33460] ... used to indicate many different things in chapter 3, some are confusing

2018-05-10 Thread Lew Kurtz
New submission from Lew Kurtz : https://docs.python.org/3/tutorial/introduction.html uses ... to mean 5 or 6 different things. Since ... is continuation prompt, some of these other uses on that page are confusing - at least they were to this newbie. The most confusing are

[issue33459] Fix "tuple display" mention in Expressions

2018-05-10 Thread Andrés Delfino
Change by Andrés Delfino : -- keywords: +patch pull_requests: +6447 stage: -> patch review ___ Python tracker ___

[issue33459] Fix "tuple display" mention in Expressions

2018-05-10 Thread Andrés Delfino
New submission from Andrés Delfino : Expressions mentions "tuple displays" in 6.16 (Operator precedence). AFAIK, there ano "tuple displays". Expressions mentions list, dict, and set displays, and then talks about generator expressions. I guess "parenthesized expressions"

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Marko Rauhamaa
Paul Rubin : > Marko Rauhamaa writes: >> It turns out "while True" is the most natural choice in about half of >> the while loops. > > Maybe the rest would be "repeat until" if Python had that? No. "Repeat until" is a relatively infrequent need.

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Marko Rauhamaa
Chris Angelico : > On Fri, May 11, 2018 at 5:59 AM, Marko Rauhamaa wrote: >> Joking aside, to answer Chris's question, of course you can use a >> real condition with "while". However, you shouldn't force it or try >> to avoid "while True". It turns out "while

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread bartc
On 10/05/2018 18:58, Skip Montanaro wrote: I wonder why someone would take a feature generally agreed to be a poorly designed feature of C, and incorporate it into a new language. I think you might be looking at a decision made in the late 1980s through a pair of glasses made in 2018. As a C

[issue31670] Associate .wasm with application/wasm

2018-05-10 Thread Brad Nelson
Brad Nelson added the comment: We have a provisional registration for application/wasm now with IANA: https://www.iana.org/assignments/provisional-standard-media-types/provisional-standard-media-types.xhtml This is also shipping in Firefox and Chrome. Would it be

[issue33449] Documentation for email.charset confusing about the location of constants

2018-05-10 Thread R. David Murray
R. David Murray added the comment: Ah, I see. Yes, those strings are actually hardcoded in the documentation source instead of being references. You are correct, they should be fixed. Note, however, that Charset is part of the legacy API and isn't actually used if

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Peter Pearson
On Wed, 09 May 2018 12:51:15 -0700, Paul Rubin wrote: > Dennis Lee Bieber writes: >> Yes, code reviews may catch such errors... and later, when the >> summary of errors is analyzed for suggestions on how to reduce them -- >> the odds are good that "assignment

[issue13044] pdb throws AttributeError at end of debugging session

2018-05-10 Thread Xavier de Gaye
Xavier de Gaye added the comment: See also issue 33458 that deals with the same problem when pdb is run as 'python -m pdb some_main.py' instead of by inserting a breakpoint with 'pdb.set_trace()'. -- ___ Python tracker

[issue33458] pdb.run() does not trace destructors of __main__

2018-05-10 Thread Xavier de Gaye
Xavier de Gaye added the comment: The following patch fixes the problem when applied applied on top of PR 6730: diff --git a/Lib/bdb.py b/Lib/bdb.py index c6a10359ac..07231ec588 100644 --- a/Lib/bdb.py +++ b/Lib/bdb.py @@ -582,7 +582,7 @@ class Bdb: cmd =

[issue33458] pdb.run() does not trace destructors of __main__

2018-05-10 Thread Xavier de Gaye
New submission from Xavier de Gaye : This issue is a companion to issue 13044. Running with Python 3.6.5 the following code fails with NameError: 1 class C: 2 def __del__(self): 3 print('deleted') 4 5 c = C() 6 x = 1 $ python -m pdb bar.py > ./bar.py(1)() ->

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread bartc
On 10/05/2018 19:51, Chris Angelico wrote: On Fri, May 11, 2018 at 4:31 AM, bartc wrote: 2x100 (4) Binary 3x100 (9) Ternary 4x100 (16) Quaternary 5x100 (25) etc 6x100 (36) 7x100 (49) 8x100 (64) Octal 9x100 (81) ... (Not

[issue33449] Documentation for email.charset confusing about the location of constants

2018-05-10 Thread Francois Labelle
Francois Labelle added the comment: Original poster here (OpenID just wouldn't work anymore). For instance: https://docs.python.org/2/library/email.charset.html Under "class email.charset.Charset" Under "header_encoding" "If the character set must be encoded before

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Skip Montanaro
> Bear in mind that Unix file modes are traditionally written in octal, > because they have no meaning as numbers. They're more like > enumerations, or bitfields. The current chmod(2) man page says that the type of the second is mode_t, but back in the early days, it appears it was just declared

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Chris Angelico
On Fri, May 11, 2018 at 5:59 AM, Marko Rauhamaa wrote: > Mikhail V : > >> On Wed, May 9, 2018 at 8:50 AM, Chris Angelico wrote: >>> On Wed, May 9, 2018 at 3:36 PM, Ian Kelly wrote: while True: >>> >>> Why is

[issue13044] pdb throws AttributeError at end of debugging session

2018-05-10 Thread Xavier de Gaye
Xavier de Gaye added the comment: Actually the segfault can be avoided by running the garbage collection before _PyState_ClearModules() in PyImport_Cleanup() and one can trace the C destructor with the attached patch global_destructors.diff applied on top of PR 6730.

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Marko Rauhamaa
Mikhail V : > On Wed, May 9, 2018 at 8:50 AM, Chris Angelico wrote: >> On Wed, May 9, 2018 at 3:36 PM, Ian Kelly wrote: >>> while True: >> >> Why is it that "while True" is idiomatic Python for a non-infinite >> loop? Is it merely

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Grant Edwards
On 2018-05-10, Jon Ribbens wrote: > This whole thread is reminding me PHP 2, which would magically treat > the second parameter of ChMod() as octal, because clearly if weak > typing is good then *no* typing must be best of all! > > ChMod($filename, 644); // second

Re: Is this a bug or a feature in TkInter?

2018-05-10 Thread Terry Reedy
On 5/10/2018 2:12 PM, charmingold...@gmail.com wrote: I'm learning to use TkInter in Python and came across this example program from 'Thinking in TkInter' (http://thinkingtkinter.sourceforge.net) - see below. Two buttons 'button1' and 'button2' are defined. The bug is that event.widget

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Skip Montanaro
> This whole thread is reminding me PHP 2, which would magically treat > the second parameter of ChMod() as octal, because clearly if weak > typing is good then *no* typing must be best of all! >ChMod($filename, 644); // second parameter is actually 420 base 10 I knew there was a reason I

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Chris Angelico
On Fri, May 11, 2018 at 5:04 AM, Jon Ribbens wrote: > On 2018-05-10, Skip Montanaro wrote: >>> I wonder why someone would take a feature generally agreed to be a >>> poorly designed feature of C, and incorporate it into a new language. >> >> I

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Jon Ribbens
On 2018-05-10, Skip Montanaro wrote: >> I wonder why someone would take a feature generally agreed to be a >> poorly designed feature of C, and incorporate it into a new language. > > I think you might be looking at a decision made in the late 1980s through a > pair of

[issue28556] typing.py upgrades

2018-05-10 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- pull_requests: +6446 ___ Python tracker ___ ___

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Chris Angelico
On Fri, May 11, 2018 at 4:31 AM, bartc wrote: > 2x100 (4) Binary > 3x100 (9) Ternary > 4x100 (16) Quaternary > 5x100 (25) etc > 6x100 (36) > 7x100 (49) > 8x100 (64) Octal > 9x100 (81) > ... (Not implemented 11x to 15x, nor 10x or 16x) >

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Mikhail V
On Wed, May 9, 2018 at 8:50 AM, Chris Angelico wrote: > On Wed, May 9, 2018 at 3:36 PM, Ian Kelly wrote: >> >> while True: >> if we_are_done(): >> break >> # do some stuff >> ... >> if error_occurred(): >> break >>

Re: How to use an API (xsd format) in Python?

2018-05-10 Thread Mark Lawrence
On 10/05/18 19:10, richardchau...@gmail.com wrote: On Thursday, May 10, 2018 at 1:54:11 PM UTC-4, Chris Angelico wrote: I need to get some data from CME Group which provides a public API to download (xsd) What packages should I use in Python to access this data through this API. Thank you.

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread bartc
On 10/05/2018 18:03, Ian Kelly wrote: On Thu, May 10, 2018 at 10:36 AM, bartc wrote: What, 0O100 instead of 0100? Yeah that's a big improvement... Fortunately octal doesn't get used much. The PEP discusses this: """ Proposed syntaxes included things like arbitrary radix

[issue28556] typing.py upgrades

2018-05-10 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- pull_requests: +6445 ___ Python tracker ___ ___

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Skip Montanaro
> I wonder why someone would take a feature generally agreed to be a > poorly designed feature of C, and incorporate it into a new language. I think you might be looking at a decision made in the late 1980s through a pair of glasses made in 2018. As a C programmer back then I never had a problem

Is this a bug or a feature in TkInter?

2018-05-10 Thread charmingoldgit
I'm learning to use TkInter in Python and came across this example program from 'Thinking in TkInter' (http://thinkingtkinter.sourceforge.net) - see below. Two buttons 'button1' and 'button2' are defined. The bug is that event.widget returns '.!frame.!button' from a button1 event. i.e. it

Re: How to use an API (xsd format) in Python?

2018-05-10 Thread richardchausse
On Thursday, May 10, 2018 at 1:54:11 PM UTC-4, Chris Angelico wrote: > > I need to get some data from CME Group which provides a public API to > > download (xsd) > > What packages should I use in Python to access this data through this API. > > Thank you. > > Depends a lot on the API, and I

[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-05-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it safer to silence this kind of warnings in 3.7 and 3.6. PR 6757 does this. -- ___ Python tracker

[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-05-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +6444 ___ Python tracker ___ ___

[issue33413] asyncio.gather should not use special Future

2018-05-10 Thread Ned Deily
Change by Ned Deily : -- components: +asyncio nosy: +asvetlov, yselivanov ___ Python tracker ___

Re: How to use an API (xsd format) in Python?

2018-05-10 Thread Chris Angelico
On Fri, May 11, 2018 at 3:49 AM, wrote: > I need to get some data from CME Group which provides a public API to > download (xsd) > What packages should I use in Python to access this data through this API. > Thank you. Depends a lot on the API, and I have no idea

How to use an API (xsd format) in Python?

2018-05-10 Thread richardchausse
I need to get some data from CME Group which provides a public API to download (xsd) What packages should I use in Python to access this data through this API. Thank you. -- https://mail.python.org/mailman/listinfo/python-list

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread MRAB
On 2018-05-10 18:03, Ian Kelly wrote: On Thu, May 10, 2018 at 10:36 AM, bartc wrote: What, 0O100 instead of 0100? Yeah that's a big improvement... Fortunately octal doesn't get used much. The PEP discusses this: """ Proposed syntaxes included things like arbitrary radix

[issue33413] asyncio.gather should not use special Future

2018-05-10 Thread Martin Teichmann
Martin Teichmann added the comment: I looked a bit into the details, and found that bpo-30048 created the described weird behavior. There they fixed the problem that a cancel is ignored if a coroutine manages to cancel its own task and return immediately. As shown

[issue33448] Output_Typo_Error

2018-05-10 Thread Mark Dickinson
Mark Dickinson added the comment: Marking as pending; we can't take this forward without more input from the OP. As far as I can tell, the documentation is perfectly correct here: I suspect that there was a misunderstanding somewhere along the line. -- assignee:

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Ian Kelly
On Thu, May 10, 2018 at 10:36 AM, bartc wrote: > What, 0O100 instead of 0100? Yeah that's a big improvement... > > Fortunately octal doesn't get used much. The PEP discusses this: """ Proposed syntaxes included things like arbitrary radix prefixes, such as 16r100 (256 in

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread Ian Kelly
On Thu, May 10, 2018 at 5:49 AM, D'Arcy Cain wrote: > On 2018-05-10 07:28 AM, Skip Montanaro wrote: >> https://www.python.org/dev/peps/pep-3127/#removal-of-old-octal-syntax > > Funny stuff: > > Python could either: > > 1. silently do the wrong thing... > 2.

Re: Print Failure or success based on the value of the standalone tool

2018-05-10 Thread Rob Gaddi
On 05/10/2018 09:48 AM, Ganesh Pal wrote: I have to test a standalone tool from a python script and I am using os.system() to run the tool . I need to take decision based on the return value of the standalone tool . But since os.system merely throws the output value to STDOUT & returns the

Re: seeking deeper (language theory) reason behind Python design choice

2018-05-10 Thread Rob Gaddi
On 05/10/2018 03:02 AM, bartc wrote: On 10/05/2018 09:09, Marko Rauhamaa wrote: bartc : When typing in code (in various languages), I have a habit of typing "..." at places that need to be implemented. For example: if count: ... else:

Print Failure or success based on the value of the standalone tool

2018-05-10 Thread Ganesh Pal
I have to test a standalone tool from a python script and I am using os.system() to run the tool . I need to take decision based on the return value of the standalone tool . But since os.system merely throws the output value to STDOUT & returns the exit status (0 => no error) of the shell , how

Re: Leading 0's syntax error in datetime.date module (Python 3.6)

2018-05-10 Thread bartc
On 10/05/2018 12:28, Skip Montanaro wrote: This gave the following error: Syntax Error: invalid token: C:\Users\Virgil Stokes\Desktop\Important Notes_Files\CheckProcessingDate_02.py, line 7, pos 17 d0 = date(2018,02,01) Note that this is a Python syntax error. It actually has nothing to do

[issue33419] Add functools.partialclass

2018-05-10 Thread Nick Coghlan
Nick Coghlan added the comment: Marking as closed/later to indicate that we're not going to pursue this in the near term, but it's not out of the question that we might accept a future proposal along these lines. -- resolution: -> later stage: patch review ->

[issue33457] python-config ldflags, PEP 513 and explicit linking to libpython in python extensions

2018-05-10 Thread dimi
New submission from dimi : The python-config outputs ldflag for explicit linking to libpyhton, which is a good idea in many use cases. However, this is inconsistent with the PEP 513 recommendation for building manylinux1 python extensions

[issue33456] site.py: by default, a virtual environment is *not* isolated from the system-level site-packages directories

2018-05-10 Thread Lukas Waymann
Change by Lukas Waymann : -- keywords: +patch pull_requests: +6442 stage: -> patch review ___ Python tracker ___

[issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0`

2018-05-10 Thread Marcel Plch
Change by Marcel Plch : -- keywords: +patch pull_requests: +6441 stage: -> patch review ___ Python tracker ___

[issue33455] test.test_posix.TestPosixSpawn::test_specify_environment fails with custom LD_LIBRARY_PATH

2018-05-10 Thread Miro Hrončok
Change by Miro Hrončok : -- keywords: +patch pull_requests: +6440 stage: -> patch review ___ Python tracker ___

[issue33456] site.py: by default, a virtual environment is *not* isolated from the system-level site-packages directories

2018-05-10 Thread Lukas Waymann
New submission from Lukas Waymann : PEP 405 says this: > By default, a virtual environment is entirely isolated from the system-level > site-packages directories. > > If the pyvenv.cfg file also contains a key include-system-site-packages with > a value of true (not case

[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-05-10 Thread miss-islington
miss-islington added the comment: New changeset 22df4187c3882c6ec67180902e1151e65b03aee0 by Miss Islington (bot) in branch '3.7': bpo-26701: Tweak the documentation for special methods in int(). (GH-6741)

[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-05-10 Thread miss-islington
miss-islington added the comment: New changeset 7488c79b600cd173b0ccea13adb567d078e7b835 by Miss Islington (bot) in branch '3.6': bpo-26701: Tweak the documentation for special methods in int(). (GH-6741)

[issue33449] Documentation for email.charset confusing about the location of constants

2018-05-10 Thread R. David Murray
R. David Murray added the comment: Can you provide an example of where this occurs in the docs? -- nosy: +r.david.murray ___ Python tracker

[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-10 Thread Rick Teachey
Rick Teachey added the comment: > Is there any scenario where the following code would be useful... Perhaps if someone, in search of a speedup, were sort of rolling their own lighter-weight equivalent to the typing module (in order to avoid importing the full typing

[issue33455] test.test_posix.TestPosixSpawn::test_specify_environment fails with custom LD_LIBRARY_PATH

2018-05-10 Thread Miro Hrončok
New submission from Miro Hrončok : When we build Python in Fedora, we set LD_LIBRARY_PATH environment variable so the testsuite is run against the currently built Python. However a test added in ef347535f289baad22c0601e12a36b2dcd155c3a (test_specify_environment) spawns a

[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-05-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +6439 ___ Python tracker ___

[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-05-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +6438 ___ Python tracker ___

[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-05-10 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset df00f048250b9a07195b0e3b1c5c0161fdcc9db8 by Nick Coghlan (Serhiy Storchaka) in branch 'master': bpo-26701: Tweak the documentation for special methods in int(). (GH-6741)

[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-05-10 Thread pmpp
Change by pmpp : -- nosy: +pmpp ___ Python tracker ___ ___ Python-bugs-list mailing list

  1   2   >