Re: ``if var'' and ``if var is not None''

2019-09-01 Thread Piet van Oostrum
Hongyi Zhao writes: > Hi, > > The following two forms are always equivalent: > > ``if var'' and ``if var is not None'' > > Regards In [1]: var = 0 In [2]: if var: ...: print('True') ...: else: ...: print('False') False In [3]: if var is not None: ...: print('True')

[issue37994] Fix silencing all errors if an attribute lookup fails

2019-09-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 41c57b335330ff48af098d47e379e0f9ba09d233 by Serhiy Storchaka in branch 'master': bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630) https://github.com/python/cpython/commit/41c57b335330ff48af098d47e379e0f9ba09d233

[issue37999] No longer use implicit convertion to int with loss

2019-09-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +15304 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15636 ___ Python tracker

[issue24416] Return a namedtuple from date.isocalendar()

2019-09-01 Thread Paul Ganssle
Paul Ganssle added the comment: > But I'm wondering how the `fromisocalendar` API relates to this patch. > Rather, wouldn't this patch contribute to improving the usability of the > `fromisocalendar` API? The `fromisocalendar` API relates to this patch only insofar as it is the inverse

[issue24416] Return a namedtuple from date.isocalendar()

2019-09-01 Thread Dong-hee Na
Dong-hee Na added the comment: @pganssle @serhiy.storchaka Sounds reasonable on the view of maintaining pure Python and C APIs at the time Thank you for the explanation. -- ___ Python tracker

[issue37998] re.sub(r'\\', r'\\\\', s) reporting MemoryError

2019-09-01 Thread Guruprasad Venkataramaiah
New submission from Guruprasad Venkataramaiah : On Python 3.5: s = re.sub(r'\\', r'', s) File "/pyuniti/venvs/guruv/lib/python3.5/re.py", line 182, in sub return _compile(pattern, flags).sub(repl, string, count) MemoryError On Python 3.7 s = re.sub(r'\\', r'', s) File

[issue37998] re.sub(r'\\', r'\\\\', s) reporting MemoryError

2019-09-01 Thread Guruprasad Venkataramaiah
Guruprasad Venkataramaiah added the comment: With more debug, observed the input string ('s') is getting assigned to a big string of '' resulting in Memory error -- stage: -> resolved status: open -> closed ___ Python tracker

[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

2019-09-01 Thread Thrlwiti
Change by Thrlwiti : -- nosy: +THRlWiTi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24416] Return a namedtuple from date.isocalendar()

2019-09-01 Thread Dong-hee Na
Dong-hee Na added the comment: @p-ganssle @taleinat I agree that there are penalties of this patch what you said. But I'm wondering how the `fromisocalendar` API relates to this patch. Rather, wouldn't this patch contribute to improving the usability of the `fromisocalendar` API? I would

[issue24416] Return a namedtuple from date.isocalendar()

2019-09-01 Thread Tal Einat
Tal Einat added the comment: Paul, I'm also on the fence regarding the advantage of this. It's not clear that the minor possible benefits outweigh the additional complexity and slight backwards-incompatibility (pickling). Thinking about this further, yes, we'd probably avoid making this

Re: open, close

2019-09-01 Thread Chris Angelico
On Mon, Sep 2, 2019 at 3:02 AM MRAB wrote: > > On 2019-09-01 16:46, Barry wrote: > > > > > >> On 31 Aug 2019, at 15:41, Manfred Lotz wrote: > >> > >> When you say COULD this sounds like it is a matter of luck. My thinking > >> was that USUALLY the file will be closed after the statement because

[issue36543] Remove old-deprecated ElementTree features (part 2)

2019-09-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f02ea6225bc3b71bd5fe66224d199a6e3e23b14d by Serhiy Storchaka in branch 'master': bpo-36543: Remove old-deprecated ElementTree features. (GH-12707) https://github.com/python/cpython/commit/f02ea6225bc3b71bd5fe66224d199a6e3e23b14d --

[issue37994] Fix silencing all errors if an attribute lookup fails

2019-09-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +15303 pull_request: https://github.com/python/cpython/pull/15635 ___ Python tracker ___

[issue15999] Using new 'bool' format character

2019-09-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset eb8974616bc58f44b2a3c3e4ca2326894ae42c8f by Serhiy Storchaka in branch 'master': bpo-15999: Always pass bool instead of int to the expat parser. (GH-15622) https://github.com/python/cpython/commit/eb8974616bc58f44b2a3c3e4ca2326894ae42c8f

[issue38000] importlib can not handle module file names with periods

2019-09-01 Thread Andrey
New submission from Andrey : ``` import os, sys def import_module(dir_path, module_name, ref_module_name = None): module_file_path = os.path.join(dir_path, module_name).replace('\\', '/') if sys.version_info[0] > 3 or sys.version_info[0] == 3 and sys.version_info[1] >= 4: import

[issue24416] Return a namedtuple from date.isocalendar()

2019-09-01 Thread Paul Ganssle
Paul Ganssle added the comment: Sorry for the late response after a patch, but I'm actually -1 on this patch. I don't think it buys us very much in terms of the API considering it only has 3 parameters, and it adds some complexity to the code (in addition to the performance issue).

Re: open, close

2019-09-01 Thread Barry
> On 31 Aug 2019, at 15:41, Manfred Lotz wrote: > > When you say COULD this sounds like it is a matter of luck. My thinking > was that USUALLY the file will be closed after the statement because > then the file handle goes out of scope. It all depends on the way any python implementation

[issue35771] IDLE: Fix tooltip Hovertiptest failure

2019-09-01 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +15302 pull_request: https://github.com/python/cpython/pull/15634 ___ Python tracker ___

[issue15999] Using new 'bool' format character

2019-09-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5eca7f3f3836cc734dfe8dc5ec669f3b4e9333fe by Serhiy Storchaka in branch 'master': bpo-15999: Always pass bool instead of int to socket.setblocking(). (GH-15621) https://github.com/python/cpython/commit/5eca7f3f3836cc734dfe8dc5ec669f3b4e9333fe

[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

2019-09-01 Thread Thrlwiti
Change by Thrlwiti : -- nosy: -THRlWiTi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38001] Unexpected behaviour of 'is' operator

2019-09-01 Thread Digin Antony
New submission from Digin Antony : The 'is' operator behave differently on two sets of values please find the attachment below tested environment windows 7 python 3.7.3 Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright",

Re: ``if var'' and ``if var is not None''

2019-09-01 Thread Terry Reedy
On 9/1/2019 2:12 AM, Hongyi Zhao wrote: The following two forms are always equivalent: ``if var'' and ``if var is not None'' Aside from the fact that this is false, why would you post such a thing? Trolling? Did you hit [Send] prematurely? -- Terry Jan Reedy --

[issue15999] Using new 'bool' format character

2019-09-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 1f21eaa15e8a0d2b0f78d0e3f2b9e5b458eb0a70 by Serhiy Storchaka in branch 'master': bpo-15999: Clean up of handling boolean arguments. (GH-15610) https://github.com/python/cpython/commit/1f21eaa15e8a0d2b0f78d0e3f2b9e5b458eb0a70 --

[issue37993] os.path.realpath on Windows resolves mapped network drives

2019-09-01 Thread Eryk Sun
Eryk Sun added the comment: >> Unix Python resolves the executable path with repeated _Py_wreadlink >> calls. Windows Python should do something similar to ensure the >> consistency of sys.executable with realpath(sys.executable). > > I don't think this necessarily follows. There's nowhere

[issue37998] re.sub(r'\\', r'\\\\', s) reporting MemoryError

2019-09-01 Thread Guruprasad Venkataramaiah
Guruprasad Venkataramaiah added the comment: With more debug, observed the input string ('s') is getting assigned to a big string of '' resulting in Memory error -- resolution: -> not a bug ___ Python tracker

[issue38001] Unexpected behaviour of 'is' operator

2019-09-01 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This will emit a SyntaxWarning in Python 3.8 to use == instead of using is for literals. This is not a bug but an implementation detail over caching a range of integers at

Re: open, close

2019-09-01 Thread Manfred Lotz
On Sun, 1 Sep 2019 16:46:44 +0100 Barry wrote: > > On 31 Aug 2019, at 15:41, Manfred Lotz wrote: > > > > When you say COULD this sounds like it is a matter of luck. My > > thinking was that USUALLY the file will be closed after the > > statement because then the file handle goes out of scope.

[issue24416] Return a namedtuple from date.isocalendar()

2019-09-01 Thread Dong-hee Na
Dong-hee Na added the comment: @taleinat @p-ganssle I am okay with closing this issue without any change. My initial purpose for this issue was also whether or not to close a long left issue. I am +1 to closing this issue without any change. Please leave a vote for this issue. If @taleinat

Re: open, close

2019-09-01 Thread Barry
> On 1 Sep 2019, at 17:57, MRAB wrote: > > On 2019-09-01 16:46, Barry wrote: >>> On 31 Aug 2019, at 15:41, Manfred Lotz wrote: >>> When you say COULD this sounds like it is a matter of luck. My thinking >>> was that USUALLY the file will be closed after the statement because >>> then the

[issue36543] Remove old-deprecated ElementTree features (part 2)

2019-09-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37999] No longer use implicit convertion to int with loss

2019-09-01 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Use only the __index__() method for implicit conversion to iteger, and not __int__(). This converts deprecation warnings added in issue36048 into TypeError. -- components: Interpreter Core messages: 350947 nosy: serhiy.storchaka priority: normal

[issue38000] importlib can not handle module file names with periods

2019-09-01 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38001] Unexpected behaviour of 'is' operator

2019-09-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37998] re.sub(r'\\', r'\\\\', s) reporting MemoryError

2019-09-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is s? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37994] Fix silencing all errors if an attribute lookup fails

2019-09-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37994] Fix silencing all errors if an attribute lookup fails

2019-09-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 353053d9ad08fea0e205e6c008b8a4350c0188e6 by Serhiy Storchaka in branch '3.8': [3.8] bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630) (GH-15635)

[issue24416] Return a namedtuple from date.isocalendar()

2019-09-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can use datetime.date.fromisocalendar(*b). -- ___ Python tracker ___ ___ Python-bugs-list

Re: ``if var'' and ``if var is not None''

2019-09-01 Thread Ian Kelly
On Sun, Sep 1, 2019, 8:58 AM Terry Reedy wrote: > On 9/1/2019 2:12 AM, Hongyi Zhao wrote: > > > The following two forms are always equivalent: > > ``if var'' and ``if var is not None'' > > Aside from the fact that this is false, why would you post such a thing? > Trolling? Did you hit [Send]

Re: open, close

2019-09-01 Thread MRAB
On 2019-09-01 16:46, Barry wrote: On 31 Aug 2019, at 15:41, Manfred Lotz wrote: When you say COULD this sounds like it is a matter of luck. My thinking was that USUALLY the file will be closed after the statement because then the file handle goes out of scope. It all depends on the way

Async subprocess context manager

2019-09-01 Thread Peter Sutton
Hi all, First time posting! I need an async context manager that ensures a Process has finished before it `__exit__()`s, either by graceful or forceful termination, and regardless of cancellation. I've put my code at the bottom. I'm relatively new to asyncio, so I'm looking for feedback on any

python-list@python.org

2019-09-01 Thread YuXuan Dong
-- https://mail.python.org/mailman/listinfo/python-list

Re: Using exec with embedded python interpreter 3.7

2019-09-01 Thread Peter Otten
Eko palypse wrote: > I've already sent this through mail yesterday but it doesn't appear here, > maybe because of the help word in the content. Please execute in case it > appears a second time. > > > Hello, > I'm creating a notepad++ plugin which hosts an embedded python interpreter > by using

Re: IDLE missing !

2019-09-01 Thread MRAB
On 2019-09-01 11:53, Alex wrote: I tried downloading the 3.7.4 version of python and and then tried to install tensorflow but found that TF is only available for version 3.5.x. Thus uninstalled the 3.7.4. version and tried downloading multiple 3.5.x version while all of them downloaded but I

[issue38001] Unexpected behaviour of 'is' operator

2019-09-01 Thread Steven D'Aprano
Steven D'Aprano added the comment: Further to Karthikeyan Singaravelan comment, the behaviour you see is absolutely correct. The operator isn't behaving differently, it is reporting precisely the truth. The ``is`` operator tests for object identity, not equality. Python makes no promises

Re: How to create a list and append to list inside a mqtt and GUI program?

2019-09-01 Thread Richard Damon
On 9/1/19 4:02 PM, Spencer Du wrote: > Hi > > I have code for GUI and MQTT. In GUI.py I have "def loadGUI" which loads up a > GUI file if the file exists in current directory. I want to add the file name > to a list when a file is imported and for each subsequent file that is > imported I want

Python 3.7.4 on win 7

2019-09-01 Thread Mohammad Arif Samana
Dear sir, I am installing the above version of python on my pc with win7 as my operating system. But I am constantly receiving error messages. What could be the problem and remedy for that. Kindly update me as I am facing problems for my studies. Also brief me about Anaconda3. Its not installing

Using exec with embedded python interpreter 3.7

2019-09-01 Thread Eko palypse
Hello, I'm creating a notepad++ plugin which hosts an embedded python interpreter by using cffi to build the dll. So far so good. One obstacle I've found is that I'm not able to use exec(help(object)) in order to get the wanted info from the object. The error I get is: Traceback (most recent

Re: open, close

2019-09-01 Thread Max Zettlmeißl via Python-list
On Sat, Aug 31, 2019 at 3:43 PM Piet van Oostrum wrote: > > There is a difference here with the construct that the OP mentioned: > > lines = open("foo.txt").readlines() > > In that case the file COULD be closed, but there is no guarantee. It depends > on garbage collection. > In your case

ssl certificate issue while installing Django on y windows 64 bit os

2019-09-01 Thread mohd zak
Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

Re: 'python' is not recognized as an internal or external command

2019-09-01 Thread MRAB
On 2019-08-31 10:13, G Kishore wrote: Hi Team, I was installing python in my new windows 10 machine and cpuld able to access python from command window when the location is where I have installed python. The same I have tried to enter the command from Desktop location but "'python' is not

How to create a list and append to list inside a mqtt and GUI program?

2019-09-01 Thread Spencer Du
Hi I have code for GUI and MQTT. In GUI.py I have "def loadGUI" which loads up a GUI file if the file exists in current directory. I want to add the file name to a list when a file is imported and for each subsequent file that is imported I want the file name to be imported to the same list

[issue37995] Multiline ast.dump()

2019-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: It would be great is the tool wasn't tightly bound to our particular AST and could be used for any hand-rolled AST. -- ___ Python tracker

[issue37995] Multiline ast.dump()

2019-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I wrote a generic AST pretty printer for a personal compiler project (see attached file). Perhaps it can be adapted to the Python AST. ## Example input ### Program(procs=[Procedure(name='FACTORIAL', params=['N'],

[issue38003] Incorrect "fixing" of isinstance tests for basestring

2019-09-01 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: https://docs.python.org/3.0/whatsnew/3.0.html > The builtin basestring abstract type was removed. Use str instead. The str > and bytes types don’t have functionality enough in common to warrant a shared > base class. The 2to3 tool (see below)

Re: How to create a list and append to list inside a mqtt and GUI program?

2019-09-01 Thread MRAB
On 2019-09-01 21:02, Spencer Du wrote: Hi I have code for GUI and MQTT. In GUI.py I have "def loadGUI" which loads up a GUI file if the file exists in current directory. I want to add the file name to a list when a file is imported and for each subsequent file that is imported I want the file

[issue37934] Docs: Clarify NotImplemented use cases

2019-09-01 Thread Kyle Stanley
Kyle Stanley added the comment: > Would it be viable to rephrase the existing section in a manner that explains > the functional purpose of NotImplemented without revolving around its use > case in binary special methods? To expand further upon this, here's an initial idea for improving the

"Edit With Python" option missing

2019-09-01 Thread Akash verma
"Edit With Python" option missing from message context when right clicked with mouse . I am facing many problems with it. -- https://mail.python.org/mailman/listinfo/python-list

problem occurring in operating python , after typing only 5-6 programs only is causing problem it has stoped working

2019-09-01 Thread best web site
Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

it is not working

2019-09-01 Thread ABID NAZIR
-- https://mail.python.org/mailman/listinfo/python-list

Re: "Edit With Python" option missing

2019-09-01 Thread DL Neil via Python-list
Hi Aakash, On 31/08/19 8:54 PM, Akash verma wrote: "Edit With Python" option missing from message context when right clicked with mouse . There are two stages to working with a Python program: editing the source-code, and executing the program. For the first, most use a text editor/IDE, eg

[issue24416] Have date.isocalendar() return a structseq instance

2019-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Why close this? Having isocalendar() return a structseq instance would be a nice improvement. It is what structseq was designed for. Dong-hee Na, if you want to make a fresh PR for this and bring it to fruition, I would be happy to review and apply it.

[issue38002] 'ModifiedInterpreter' object has no attribute 'interp'

2019-09-01 Thread Raymond Hettinger
New submission from Raymond Hettinger : Here's a new traceback I haven't seen before. I only see these at the end of a session, so I don't know which steps triggered it. $ python3.8 -m idlelib.idle tmp_pretty_fact_ast.py Exception in Tkinter callback Traceback (most recent call last): File

Re: "Edit With Python" option missing

2019-09-01 Thread Terry Reedy
On 8/31/2019 4:54 AM, Akash verma wrote: "Edit With Python" option missing from message context when right clicked with mouse . 'Edit with Python' does not make much sense since Python is not an editor. What OS? If Windows, do you possible mean 'Edit with IDLE'? If so, that requires

Problem while integrating unittest with setuptools

2019-09-01 Thread YuXuan Dong
Hi, everybody: I met a problem while I ran `python setup.py test`: unittest.case.SkipTest: No module named 'winreg' I ran the command in MacOS and my project is written for only UNIX-like systems. I don't use any Windows-specified API. How dose `winreg` come here? In my `setup.py`:

Re: pandas loc on str lower for column comparison

2019-09-01 Thread Sayth Renshaw
I've created a share doc same structure anon data from my google drive. https://drive.google.com/file/d/0B28JfFTPNr_lckxQRnFTRF9UTEFYRUVqRWxCNVd1VEZhcVNr/view?usp=sharing Sayth -- https://mail.python.org/mailman/listinfo/python-list

Issue About Install pyinstaller

2019-09-01 Thread Mehmet Furkan ÇOLAK
Have a good day sir, I use python so much, I try to install pyinstaller in order to covert .py files to .exe files I did “cmd > pip install pyinstaller > enter” from C:\Users\Furkan ÇOLAK\AppData\Local\Programs\Python\Python37-32 but there isnt Script folder. İn cmd I see this kind of ERROR

'python' is not recognized as an internal or external command

2019-09-01 Thread G Kishore
Hi Team, I was installing python in my new windows 10 machine and cpuld able to access python from command window when the location is where I have installed python. The same I have tried to enter the command from Desktop location but "'python' is not recognized as an internal or external

Using exec with embedded python interpreter 3.7

2019-09-01 Thread Eko palypse
I've already sent this through mail yesterday but it doesn't appear here, maybe because of the help word in the content. Please execute in case it appears a second time. Hello, I'm creating a notepad++ plugin which hosts an embedded python interpreter by using cffi to build the dll. So far so

IDLE missing !

2019-09-01 Thread Alex
I tried downloading the 3.7.4 version of python and and then tried to install tensorflow but found that TF is only available for version 3.5.x. Thus uninstalled the 3.7.4. version and tried downloading multiple 3.5.x version while all of them downloaded but I couldn’d find the IDLE shell with

PYTHON DIDNT DETECTED

2019-09-01 Thread АРТЁМ БОЗАДЖИ via Python-list
Traceback (most recent call last): File "", line 1, in NameError: name 'python' is not defined and more  C:\Users\VeNoMD>python -v import _frozen_importlib # frozen import _imp # builtin import '_thread' # import '_warnings' # import '_weakref' # # installing zipimport hook import 'zipimport'

Need help: integrating unittest with setuptools

2019-09-01 Thread YuXuan Dong
Hi, everybody: I have met a problem while I ran `python setup.py test`: unittest.case.SkipTest: No module named 'winreg' I ran the command in MacOS and my project is written for only UNIX-like systems. I don't use any Windows-specified API. How dose `winreg` come here? In my

How to create list for stuff inside mqtt and GUI?.

2019-09-01 Thread Spencer Du via Python-list
Hi I have code for GUI and MQTT. In GUI.py I have "def loadGUI" which loads up a GUI file if the file exists in current directory. I want to add the file name to a list when a file is imported and for each subsequent file that is imported I want the file name to be imported to the same list

Re: Issue About Install pyinstaller

2019-09-01 Thread MRAB
On 2019-09-01 17:15, Mehmet Furkan ÇOLAK wrote: Have a good day sir, I use python so much, I try to install pyinstaller in order to covert .py files to .exe files I did “cmd > pip install pyinstaller > enter” from C:\Users\Furkan ÇOLAK\AppData\Local\Programs\Python\Python37-32 but there isnt

[issue38003] Incorrect "fixing" of isinstance tests for basestring

2019-09-01 Thread Bob Kline
New submission from Bob Kline : We are attempting to convert a large Python 2 code base. Following the guidance of the official documentation (https://docs.python.org/2/library/functions.html#basestring) we created tests in many, many places that look like this: if isinstance(value,

Re: Need help: integrating unittest with setuptools

2019-09-01 Thread Sayth Renshaw
On Monday, 2 September 2019 04:44:29 UTC+10, YuXuan Dong wrote: > Hi, everybody: > > I have met a problem while I ran `python setup.py test`: > > unittest.case.SkipTest: No module named 'winreg' > > I ran the command in MacOS and my project is written for only UNIX-like > systems. I

[issue24416] Have date.isocalendar() return a structseq instance

2019-09-01 Thread Paul Ganssle
Paul Ganssle added the comment: > Dong-hee Na, if you want to make a fresh PR for this and bring it to > fruition, I would be happy to review and apply it. It seems premature to say that you will accept a PR for this when there's no consensus for actually adding the feature, and it would be

Re: a,b = 2,3 and [a,b] = [2,3]

2019-09-01 Thread Alan Bawden
Eko palypse writes: > Am Montag, 2. September 2019 00:49:05 UTC+2 schrieb Hongyi Zhao: > > Hi, > > > > What's differences: > > > > a,b = 2,3 and [a,b] = [2,3] > > > > Regards > > In this example the result is the same but the second one > builds, internally, an additional list, therefore

[issue37995] Multiline ast.dump()

2019-09-01 Thread Raymond Hettinger
Change by Raymond Hettinger : Removed file: https://bugs.python.org/file48579/ast_bloop.py ___ Python tracker ___ ___ Python-bugs-list

[issue37995] Multiline ast.dump()

2019-09-01 Thread Raymond Hettinger
Change by Raymond Hettinger : Added file: https://bugs.python.org/file48580/ast_bloop.py ___ Python tracker ___ ___ Python-bugs-list

Re: Problem while integrating unittest with setuptools

2019-09-01 Thread dieter
YuXuan Dong writes: > I met a problem while I ran `python setup.py test`: > > unittest.case.SkipTest: No module named 'winreg' > ... no windows modules should be necessary ... I know apparently unexplainable "no module named ..." messages as a side effect of the use of "six". "six" is

Re: Python 3.7.4 on win 7

2019-09-01 Thread MRAB
On 2019-08-30 13:25, Mohammad Arif Samana wrote: Dear sir, I am installing the above version of python on my pc with win7 as my operating system. But I am constantly receiving error messages. What could be the problem and remedy for that. Kindly update me as I am facing problems for my studies.

Re: IDLE not working

2019-09-01 Thread Terry Reedy
On 9/1/2019 1:06 AM, Anoushka wrote: Even after repairing my python IDLE, my IDLE is not working. It says sub process connection error. Kindly help me to resolve. I want to recover my previous work. Sent from Mail for Windows 10 Select Help => IDLE Help and read the Startup Failure section.

[issue38003] Incorrect "fixing" of isinstance tests for basestring

2019-09-01 Thread Bob Kline
Bob Kline added the comment: > Use str instead. Sure. I understand the advantages of the new approach to strings. Which, by the way, weren't available when this project began. I don't disagree with anything you say in the context of writing new code. I was, however, surprised and dismayed

Re: a,b = 2,3 and [a,b] = [2,3]

2019-09-01 Thread Chris Angelico
On Mon, Sep 2, 2019 at 12:36 PM Alan Bawden wrote: > > Eko palypse writes: > > > Am Montag, 2. September 2019 00:49:05 UTC+2 schrieb Hongyi Zhao: > > > Hi, > > > > > > What's differences: > > > > > > a,b = 2,3 and [a,b] = [2,3] > > > > > > Regards > > > > In this example the result is the same

IDLE not working

2019-09-01 Thread Anoushka
Even after repairing my python IDLE, my IDLE is not working. It says sub process connection error. Kindly help me to resolve. I want to recover my previous work. Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

Re: Using exec with embedded python interpreter 3.7

2019-09-01 Thread MRAB
On 2019-08-31 13:16, Eko palypse wrote: I've already sent this through mail yesterday but it doesn't appear here, maybe because of the help word in the content. Please execute in case it appears a second time. Hello, I'm creating a notepad++ plugin which hosts an embedded python interpreter

Re: IDLE missing !

2019-09-01 Thread Piet van Oostrum
Alex writes: > I tried downloading the 3.7.4 version of python and and then tried to > install tensorflow but found that TF is only available for version > 3.5.x. > Thus uninstalled the 3.7.4. version and tried downloading multiple 3.5.x > version while all of them downloaded but I couldn’d find

Re: How to create a list and append to list inside a mqtt and GUI program?

2019-09-01 Thread Sayth Renshaw
On Monday, 2 September 2019 06:02:58 UTC+10, Spencer Du wrote: > Hi > > I have code for GUI and MQTT. In GUI.py I have "def loadGUI" which loads up a > GUI file if the file exists in current directory. I want to add the file name > to a list when a file is imported and for each subsequent

[issue37934] Docs: Clarify NotImplemented use cases

2019-09-01 Thread Kyle Stanley
Kyle Stanley added the comment: Thanks for the feedback Vedran and Raymond. > It is not the purpose of the docs to list use cases. Mostly we say what > something does or how it is defined. As Vedran says, how people use it is > their own business. The underlying issue here seems to be

``if var'' and ``if var is not None''

2019-09-01 Thread Hongyi Zhao
Hi, The following two forms are always equivalent: ``if var'' and ``if var is not None'' Regards -- https://mail.python.org/mailman/listinfo/python-list

Re: ``if var'' and ``if var is not None''

2019-09-01 Thread Chris Angelico
On Sun, Sep 1, 2019 at 4:16 PM Hongyi Zhao wrote: > > Hi, > > The following two forms are always equivalent: > > ``if var'' and ``if var is not None'' > Ahh... False. I'll go False. I'll be honest, I might have heard that one before, though. Sort of cheating. ChrisA --

[issue24416] Return a namedtuple from date.isocalendar()

2019-09-01 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +15301 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15633 ___ Python tracker ___

Re: ``if var'' and ``if var is not None''

2019-09-01 Thread Frank Millman
On 2019-09-01 8:12 AM, Hongyi Zhao wrote: Hi, The following two forms are always equivalent: ``if var'' and ``if var is not None'' Regards Not so. Here is an example - >>> var = [] >>> bool(var) False >>> bool(var is not None) True >>> Frank Millman --