[issue41266] IDLE call hints and completions confused by ints and floats

2022-01-31 Thread wyz23x2


wyz23x2  added the comment:

Ping, this issue is 571 days old.

--

___
Python tracker 
<https://bugs.python.org/issue41266>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43500] Add filtercase() into fnmatch

2021-03-15 Thread wyz23x2


New submission from wyz23x2 :

The fnmatch module has a filter() function:
> Construct a list from those elements of the iterable names that match pattern.
> It is the same as [n for n in names if fnmatch(n, pattern)], but implemented 
> more efficiently.
However, since there is the fnmatchcase() function, we should have filtercase() 
too.

--
components: Library (Lib)
messages: 388732
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: Add filtercase() into fnmatch
versions: Python 3.10, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43500>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43500] Add filtercase() into fnmatch

2021-03-15 Thread wyz23x2


Change by wyz23x2 :


--
type:  -> enhancement

___
Python tracker 
<https://bugs.python.org/issue43500>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41730] Show deprecation warnings for tkinter.tix

2021-03-16 Thread wyz23x2


wyz23x2  added the comment:

Um, is this going on?

--

___
Python tracker 
<https://bugs.python.org/issue41730>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43695] Improve `=` in f-strings

2021-04-01 Thread wyz23x2


New submission from wyz23x2 :

In Python 3.8, `=` was added into f-strings:
>>> a, b, c = 20, 40, 10
>>> f'{a+b-c=}'
a+b-c=50
But if `20+40-10` is wanted, this needs to be written:
>>> f'{a}+{b}-{c}={a+b-c}'
20+40-10=50
So something could be added. For example, `?` (this doesn't mean I recommend 
the question mark):
>>> f'{a?+b?-c?=}'
20+40-10=50
>>> f'{a+b?-c=}'
a+40-c=50
>>> f'{a+b-c=?}'  # Suffix `=` to apply to all?
20+40-10

Suggestions?

--
components: Interpreter Core
messages: 389979
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: Improve `=` in f-strings
type: enhancement
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue43695>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43695] Improve `=` in f-strings

2021-04-01 Thread wyz23x2


wyz23x2  added the comment:

Well, it's:
>>> f'{a+b-c=?}'  # Suffix `=` to apply to all?
20+40-10=50


P.S. When will the bug tracker enable message editing?

--

___
Python tracker 
<https://bugs.python.org/issue43695>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41370] PEP 585 and ForwardRef

2021-04-19 Thread wyz23x2


Change by wyz23x2 :


--
nosy:  -wyz23x2

___
Python tracker 
<https://bugs.python.org/issue41370>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14965] super() and property inheritance behavior

2021-05-04 Thread wyz23x2


Change by wyz23x2 :


--
components: +Interpreter Core -Extension Modules
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7

___
Python tracker 
<https://bugs.python.org/issue14965>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41730] Show deprecation warnings for tkinter.tix

2021-05-06 Thread wyz23x2


wyz23x2  added the comment:

When this issue was submitted on September 5, 2020, Python 3.9 was still in 
beta/rc stages. Now 242 days have passed and the developing of 3.11 has 
started.  :)

--

___
Python tracker 
<https://bugs.python.org/issue41730>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41730] Show deprecation warnings for tkinter.tix

2021-05-06 Thread wyz23x2


Change by wyz23x2 :


--
versions: +Python 3.11 -Python 3.8

___
Python tracker 
<https://bugs.python.org/issue41730>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41730] Show deprecation warnings for tkinter.tix

2021-05-07 Thread wyz23x2


wyz23x2  added the comment:

Merged!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue41730>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41730] Show deprecation warnings for tkinter.tix

2021-05-07 Thread wyz23x2


Change by wyz23x2 :


--
versions:  -Python 3.9

___
Python tracker 
<https://bugs.python.org/issue41730>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44024] Improve the TypeError message for non-string second arguments passed to the built-in functions getattr and hasattr

2021-05-22 Thread wyz23x2


Change by wyz23x2 :


--
versions:  -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue44024>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44317] Misleading mark of octal SyntaxErrors

2021-06-05 Thread wyz23x2


New submission from wyz23x2 :

Python 3.10.0b2 (tags/v3.10.0b2:3173141, Jun  1 2021, 09:05:29) [MSC v.1928 64 
bit (AMD64)] on win32 
Type "help", "copyright", "credits" or "license" for more information.
>>> 0777
  File "", line 1
0777
   ^
SyntaxError: leading zeros in decimal integer literals are not permitted; use 
an 0o prefix for octal integers
>>> 000123
  File "", line 1
000123
 ^
SyntaxError: leading zeros in decimal integer literals are not permitted; use 
an 0o prefix for octal integers

The ^ is placed below the last digit.
However, this is misleading. The error is "leading zeros" and "prefix". So I 
would expect this:

>>> 0777
  File "", line 1
0777
^
SyntaxError: leading zeros in decimal integer literals are not permitted; use 
an 0o prefix for octal integers
>>> 000123
  File "", line 1
000123
^^^
SyntaxError: leading zeros in decimal integer literals are not permitted; use 
an 0o prefix for octal integers

Opinions?

--
components: Parser
messages: 395161
nosy: lys.nikolaou, pablogsal, wyz23x2
priority: normal
severity: normal
status: open
title: Misleading mark of octal SyntaxErrors
type: behavior
versions: Python 3.10, Python 3.11

___
Python tracker 
<https://bugs.python.org/issue44317>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44318] Asyncio classes missing __slots__

2021-06-05 Thread wyz23x2


wyz23x2  added the comment:

OK, so:
>>> (1).__slots__
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'int' object has no attribute '__slots__'
>>> 4.5.__slots__
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'float' object has no attribute '__slots__'
>>> complex(5, 2).__slots__
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'complex' object has no attribute '__slots__'
>>> 'Hello'.__slots__
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'str' object has no attribute '__slots__'
>>> b'50'.__slots__
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'bytes' object has no attribute '__slots__'
>>> [2.72, 3.14].__slots__
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'list' object has no attribute '__slots__'
>>> 

Many many more.
So these *all* need __slots__???
That a major change into Python 5000.

--
nosy: +wyz23x2

___
Python tracker 
<https://bugs.python.org/issue44318>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44318] Asyncio classes missing __slots__

2021-06-05 Thread wyz23x2


Change by wyz23x2 :


--
nosy:  -wyz23x2

___
Python tracker 
<https://bugs.python.org/issue44318>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44317] Problems of int literal SyntaxErrors

2021-06-05 Thread wyz23x2


wyz23x2  added the comment:

Another 2 problems:
1.
>>> 0b1112
  File "", line 1
0b1112
 ^
SyntaxError: invalid digit '2' in binary literal
>>> 0o5780
  File "", line 1
0o5780
^
SyntaxError: invalid digit '8' in octal literal
But:
>>> 0x2fag
  File "", line 1
0x2fag
^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
>>> 
Is this expected?

2.
>>> 0o91
  File "", line 1
0o91
 ^
SyntaxError: invalid digit '9' in octal literal
>>> 0b21
  File "", line 1
0b21
 ^
SyntaxError: invalid digit '2' in binary literal

The ^ is misplaced again, even though, say the 0b1112 example above works.

--
title: Misleading mark of octal SyntaxErrors -> Problems of int literal 
SyntaxErrors

___
Python tracker 
<https://bugs.python.org/issue44317>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44317] Suggestion for better syntax errors in tokenizer errors

2021-06-06 Thread wyz23x2


Change by wyz23x2 :


--
type: behavior -> enhancement

___
Python tracker 
<https://bugs.python.org/issue44317>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44640] Typos in error messages of isinstance() & issubclass()

2021-07-14 Thread wyz23x2


New submission from wyz23x2 :

>>> isinstance(2, 1)
Traceback (most recent call last):
  ...
TypeError: isinstance() arg 2 must be a type, a tuple of types or a union
>>> issubclass(int, 1)
Traceback (most recent call last):
  ..
TypeError: issubclass() arg 2 must be a class, a tuple of classes, or a union.

1) It should be "an union", not "a union".
2) The punctuation marks aren't the same -- there's a comma before "or" in 
issubclass, but not isinstance(). And issubclass()'s ends with a period, which 
isn't the same with other builtins' messages.

--
components: Interpreter Core
messages: 397499
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: Typos in error messages of isinstance() & issubclass()
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue44640>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44640] Typos in error messages of isinstance() & issubclass()

2021-07-14 Thread wyz23x2


Change by wyz23x2 :


--
keywords: +patch
pull_requests: +25686
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/27144

___
Python tracker 
<https://bugs.python.org/issue44640>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44640] Typos in error messages of isinstance() & issubclass()

2021-07-14 Thread wyz23x2


wyz23x2  added the comment:

Changed to only 2).

--

___
Python tracker 
<https://bugs.python.org/issue44640>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44640] Fix punctuation in isinstance() error message

2021-07-16 Thread wyz23x2


Change by wyz23x2 :


--
title: Typos in error messages of isinstance() & issubclass() -> Fix 
punctuation in isinstance() error message

___
Python tracker 
<https://bugs.python.org/issue44640>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27035] Cannot set exit code in atexit callback

2021-07-26 Thread wyz23x2


Change by wyz23x2 :


--
versions: +Python 3.10, Python 3.11 -Python 3.6, Python 3.7

___
Python tracker 
<https://bugs.python.org/issue27035>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41266] IDLE call hints and completions confused by ints and floats

2021-09-21 Thread wyz23x2


wyz23x2  added the comment:

Ping.
>>> from datetime import datetime as d
>>> d(2021, 9, 22)-d(2020, 7, 10)
datetime.timedelta(days=439)

--

___
Python tracker 
<https://bugs.python.org/issue41266>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45420] Python 3.10 final installation failure

2021-10-09 Thread wyz23x2


New submission from wyz23x2 :

Hi, I've downloaded Python 3.10 final (64-bit) from python.org on October 6. 
But when I run the installer with administrator permission, it says "No Python 
3.10 installation was detected". Error code: 0x80070643. The stranger thing is 
when I run "repair" from the 3.10rc2 installer, it's the same message & code; 
but, if "modify" is run, the window is "A newer version of Python 3.10 is 
already installed", error code same. Thanks for help.

--
components: Installation, Windows
files: new_install_log.log
messages: 403566
nosy: paul.moore, steve.dower, tim.golden, wyz23x2, zach.ware
priority: normal
severity: normal
status: open
title: Python 3.10 final installation failure
type: crash
versions: Python 3.10
Added file: https://bugs.python.org/file50335/new_install_log.log

___
Python tracker 
<https://bugs.python.org/issue45420>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45420] Python 3.10 final installation failure

2021-10-09 Thread wyz23x2


wyz23x2  added the comment:

Note: I'm trying to move the installation path from 
Local\Programs\Python\Python310 under user dir to C:\Program Files\Python310.

--
Added file: https://bugs.python.org/file50336/old_modify_log.log

___
Python tracker 
<https://bugs.python.org/issue45420>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23262] webbrowser module broken with Firefox 36+

2021-10-12 Thread wyz23x2


wyz23x2  added the comment:

I think this six year old issue can be closed. All patches for 3.x are 
committed, and Python 2.7 is EOL.

--
nosy: +wyz23x2

___
Python tracker 
<https://bugs.python.org/issue23262>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45456] 'pass' in 'if-else' linear expression

2021-10-12 Thread wyz23x2


wyz23x2  added the comment:

Well,
x = 1 if False else pass
and
if False: x = 1

1 line vs 1 line :) It's just not needed.

--
nosy: +wyz23x2

___
Python tracker 
<https://bugs.python.org/issue45456>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45420] Python 3.10 final installation failure

2021-10-14 Thread wyz23x2

wyz23x2  added the comment:

 

--

___
Python tracker 
<https://bugs.python.org/issue45420>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45420] Python 3.10 final installation failure

2021-10-16 Thread wyz23x2


wyz23x2  added the comment:

I did.

--

___
Python tracker 
<https://bugs.python.org/issue45420>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45420] Python 3.10 final installation failure

2021-10-16 Thread wyz23x2


wyz23x2  added the comment:

I'm sorry, but the option is grayed out. See attached screenshot.

--
Added file: https://bugs.python.org/file50366/screenshot.png

___
Python tracker 
<https://bugs.python.org/issue45420>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45420] Python 3.10 final installation failure

2021-10-16 Thread wyz23x2


wyz23x2  added the comment:

> This kind of issue can also arise when you directly delete the install, 
> rather than uninstalling it.
Sort of, but I expected upgrading with a new directory to work. When the first 
few times didn't work, I deleted the installation directly (should have 
uninstalled it). :(
> Best thing to do if you can is to run a repair through the Add Remove 
> Programs entry, and then uninstall it (this is because ensurepip needs a 
> working install to uninstall itself... not ideal, but that's how it was 
> added). Then you should be able to do the proper install.
Running from the Add Remove Programs entry prompts for admin access. (Is there 
a way to do that in Control Panel?) Directly running "repair" in the rc2 
installer with admin says "No Python 3.10 installation was detected", error 
code: 0x8007064. (Same error message & code when running 3.10 final 
installation.)

Sorry if the problem is complicated.

--

___
Python tracker 
<https://bugs.python.org/issue45420>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45420] Python 3.10 final installation failure

2021-10-29 Thread wyz23x2


wyz23x2  added the comment:

I upgraded to Windows 11 _and_ deleted all Python 3.10 related installations in 
regedit. Still doesn't work :(

--

___
Python tracker 
<https://bugs.python.org/issue45420>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45420] Python 3.10 final installation failure

2021-10-29 Thread wyz23x2


wyz23x2  added the comment:

BTW, how does the installer detect whether if another version is installed?

--

___
Python tracker 
<https://bugs.python.org/issue45420>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45804] IDLE - faster shell writing

2021-11-21 Thread wyz23x2


Change by wyz23x2 :


--
assignee:  -> terry.reedy
components: +IDLE

___
Python tracker 
<https://bugs.python.org/issue45804>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45420] Python 3.10 final installation failure

2021-12-08 Thread wyz23x2


wyz23x2  added the comment:

Problem solved by installing 3.10.1. (Why?) Thanks!

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45420>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39192] relationlist module

2020-01-02 Thread wyz23x2


New submission from wyz23x2 :

I've written a handy tool--RelationList. This type can easily create relations 
between elements in lists.

--
components: Demos and Tools
files: relationlist.py
messages: 359197
nosy: asvetlov, dkaveshnikov, wyz23x2, yselivanov
priority: normal
severity: normal
status: open
title: relationlist module
type: enhancement
versions: Python 3.8
Added file: https://bugs.python.org/file48820/relationlist.py

___
Python tracker 
<https://bugs.python.org/issue39192>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39192] relationlist module

2020-01-02 Thread wyz23x2


Change by wyz23x2 :


--
components:  -Demos and Tools
versions: +Python 3.9 -Python 3.8

___
Python tracker 
<https://bugs.python.org/issue39192>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39192] relationlist module

2020-01-02 Thread wyz23x2


wyz23x2  added the comment:

I've written a handy tool--RelationList. This type can easily create relations 
between elements in lists.

--
Added file: https://bugs.python.org/file48821/relationlist.py

___
Python tracker 
<https://bugs.python.org/issue39192>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39596] reverse parameter for enumerate()

2020-02-09 Thread wyz23x2


New submission from wyz23x2 :

Starting from Python 2.3, the handy enumerate() was introduced.
However, I suggest to add a "reverse" parameter:
>>> lis = ['a', 'b', 'c', 'd']
>>> list(enumerate(lis))
[(0,'a'),(1,'b'),(2,'c'),(3,'d')]
>>> list(enumerate(lis,reverse=True)
[('a',0),('b',1),('c',2),('d',3)]
>>>

--
components: Build
messages: 361670
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: reverse parameter for enumerate()
type: enhancement
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue39596>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39596] reverse parameter for enumerate()

2020-02-09 Thread wyz23x2


wyz23x2  added the comment:

A typo in the previous comment:
>>> list(enumerate(lis,reverse=True))
[('a',0),('b',1),('c',2),('d',3)]

--

___
Python tracker 
<https://bugs.python.org/issue39596>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39608] Bug in 00000000000000000

2020-02-11 Thread wyz23x2


New submission from wyz23x2 :

Why is this?
>>> 000 # No error
0
>>> 002
SyntaxError: leading zeros in decimal integer literals are not permitted; use 
an 0o prefix for octal integers

--
components: Build
messages: 361796
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: Bug in 0
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue39608>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39608] Bug in lots of 0s

2020-02-11 Thread wyz23x2


Change by wyz23x2 :


--
title: Bug in 0 -> Bug in lots of 0s

___
Python tracker 
<https://bugs.python.org/issue39608>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39608] Bug in lots of 0s

2020-02-11 Thread wyz23x2


wyz23x2  added the comment:

2 is not supported;
So 000 should not too.

--

___
Python tracker 
<https://bugs.python.org/issue39608>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2


New submission from wyz23x2 :

the tempfile.mktemp() function was deprecated since version 2.3; it's long ago 
(nearly 17 years)! It should be removed since it causes security holes, as 
stated in the tempfile doc 
(https://docs.python.org/3/library/tempfile.html#tempfile.mktemp).

--
components: IO
messages: 362762
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: remove tempfile.mktemp()
type: security
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue39768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2


wyz23x2  added the comment:

A small typo in the 1st comment:
The tempfile.mktemp() function was deprecated since version 2.3; it's long ago 
(nearly 17 years!). It should be removed since it causes security holes, as 
stated in the tempfile doc 
(https://docs.python.org/3/library/tempfile.html#tempfile.mktemp).

--

___
Python tracker 
<https://bugs.python.org/issue39768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2


Change by wyz23x2 :


--
components: +Library (Lib)

___
Python tracker 
<https://bugs.python.org/issue39768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2


wyz23x2  added the comment:

Sorry, didn't realize that.

--

___
Python tracker 
<https://bugs.python.org/issue39768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2


wyz23x2  added the comment:

But I think the function should redirect to NamedTemporaryFile(delete=False).

--

___
Python tracker 
<https://bugs.python.org/issue39768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2


wyz23x2  added the comment:

You could add a check that does this:
(a)
from tempfile import mktemp
with open(mktemp()) as f:
# do something...

## No Warnings
(b)
from tempfile import mktemp
path = mktemp()
# do something...
with open(mktemp()) as f:
# do something...

## RuntimeWarning: mktemp() is unsafe. Use NamedTemporaryFile(delete=False).

--

___
Python tracker 
<https://bugs.python.org/issue39768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2


wyz23x2  added the comment:

(c)
from tempfile import mktemp
# do something...
path = mktemp()
# do something... (the "path" var is not used at all)

## No Warning

--

___
Python tracker 
<https://bugs.python.org/issue39768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2


wyz23x2  added the comment:

case c is used for the case that is stated in 
https://mail.python.org/pipermail/python-dev/2019-March/156725.html (a
temporary name that an other program will create / act on).

--

___
Python tracker 
<https://bugs.python.org/issue39768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2


wyz23x2  added the comment:

I know it's hard to achieve :)

--

___
Python tracker 
<https://bugs.python.org/issue39768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2


wyz23x2  added the comment:

Sorry, in (a)(b) is should be with "open(mktemp(),'x') as f:".

--

___
Python tracker 
<https://bugs.python.org/issue39768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2


wyz23x2  added the comment:

Reopen.
1.See https://mail.python.org/pipermail/python-dev/2019-March/156765.html and 
https://owasp.org/www-community/vulnerabilities/Insecure_Temporary_File. It's 
*serious*.
2.Why not use this to generate a
temporary name that an other program will create/act on?
import secrets
path = f"{x}{secrets.token_hex(n)}" # n is an large int
# x is a path like "/tmp"
# do something...

--
resolution: duplicate -> 
status: closed -> open

___
Python tracker 
<https://bugs.python.org/issue39768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39768] remove tempfile.mktemp()

2020-02-26 Thread wyz23x2


Change by wyz23x2 :


--
nosy:  -ZackerySpytz

___
Python tracker 
<https://bugs.python.org/issue39768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39772] Python 2 FAQ shown in h...@python.org auto reply

2020-02-26 Thread wyz23x2


New submission from wyz23x2 :

The auto-reply from help@python contains this:

The Python FAQ is available at

http://docs.python.org/2/faq/index.html

Why is it .org/2/faq, not .org/3/faq?

--
components: email
files: email.png
messages: 362784
nosy: barry, r.david.murray, wyz23x2
priority: normal
severity: normal
status: open
title: Python 2 FAQ shown in h...@python.org auto reply
Added file: https://bugs.python.org/file48919/email.png

___
Python tracker 
<https://bugs.python.org/issue39772>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39772] Python 2 FAQ shown in h...@python.org auto reply

2020-02-27 Thread wyz23x2


Change by wyz23x2 :


--
nosy:  -barry, r.david.murray

___
Python tracker 
<https://bugs.python.org/issue39772>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39768] remove tempfile.mktemp()

2020-02-27 Thread wyz23x2


wyz23x2  added the comment:

Well, I just think it's *serious*.
I respect your thoughts. If you want to close this, you can.

--

___
Python tracker 
<https://bugs.python.org/issue39768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39893] Add set_terminate() to logging

2020-03-07 Thread wyz23x2


New submission from wyz23x2 :

Sometimes, we want to remove the ending \n and sometimes replace it wit 
something else, like print(). But logging doesn't support that.
I'd want a set_terminate() (Or set_end()) function that does that. I think it's 
easy. Just insert this at line 1119 of __init__ of 3.8.2:
def set_terminator(string='\n'):
StreamHandler.terminator = string
Thanks!

--
components: Library (Lib)
messages: 363622
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: Add set_terminate() to logging
type: enhancement
versions: Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue39893>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39893] Add set_terminate() to logging

2020-03-07 Thread wyz23x2


wyz23x2  added the comment:

typo: "with something else", not "wit something else". Sorry for that.

--

___
Python tracker 
<https://bugs.python.org/issue39893>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39768] remove tempfile.mktemp()

2020-03-07 Thread wyz23x2


Change by wyz23x2 :


--
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue39768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39893] Add set_terminate() to logging

2020-03-09 Thread wyz23x2


Change by wyz23x2 :


--
versions: +Python 3.5, Python 3.6, Python 3.7

___
Python tracker 
<https://bugs.python.org/issue39893>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40051] Dead link in help(lib2to3)

2020-03-23 Thread wyz23x2


New submission from wyz23x2 :

When typing this in shell:
>>> import lib2to3
>>> help(lib2to3)

The output contains this link:
--snip--
MODULE REFERENCE
https://docs.python.org/3.8/library/lib2to3 <--

The following documentation is automatically generated from the Python
--snip--

But when you access it, 404!
This works:
https://docs.python.org/3.8/library/2to3.html#module-lib2to3

Please change it. Thanks!

--
assignee: docs@python
components: 2to3 (2.x to 3.x conversion tool), Documentation, Library (Lib)
messages: 364917
nosy: docs@python, wyz23x2
priority: normal
severity: normal
status: open
title: Dead link in help(lib2to3)
type: performance
versions: Python 3.8

___
Python tracker 
<https://bugs.python.org/issue40051>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40051] Dead link in help(lib2to3/idlelib/turtledemo/tkinter.sub/test_*/?)

2020-03-29 Thread wyz23x2


wyz23x2  added the comment:

My opinion:
I think No.2 makes more sense to users that visit the docs directly by 
https://docs.python.org/3.8/library/lib2to3.html; they will copy the 
"docs.python.org/version/library/modulename.html" format from other modules. 
But I also agree it's fragile.
No.3 is good too, according to me. Can use it if No.2 is too fragile.

--

___
Python tracker 
<https://bugs.python.org/issue40051>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40386] Strange behavior during invalid import of modules without if __name__ == "__main__"

2020-04-24 Thread wyz23x2


Change by wyz23x2 :


--
components: +Library (Lib)
versions: +Python 3.7, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue40386>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40386] Strange behavior during invalid import of modules without if __name__ == "__main__"

2020-04-24 Thread wyz23x2


New submission from wyz23x2 :

This behavior:

Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> import this.main
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
Traceback (most recent call last):
  File "", line 1, in 
import this.main
ModuleNotFoundError: No module named 'this.main'; 'this' is not a package
>>> import this.main
Traceback (most recent call last):
  File "", line 1, in 
import this.main
ModuleNotFoundError: No module named 'this.main'; 'this' is not a package
>>> del this
Traceback (most recent call last):
  File "", line 1, in 
del this
NameError: name 'this' is not defined
>>> import this
>>>

This confuses users because the code of "this" is un the 1st time, but not the 
times after it. And "this" isn't actually imported after that; stranger is when 
you perform the correct import, it doesn't run.

Is this right?

--
messages: 367253
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: Strange behavior during invalid import of modules without if __name__ == 
"__main__"

___
Python tracker 
<https://bugs.python.org/issue40386>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40386] Strange behavior during invalid import of modules without if __name__ == "__main__"

2020-04-24 Thread wyz23x2


wyz23x2  added the comment:

Sorry, it's "of 'this' is run", not "un".

--

___
Python tracker 
<https://bugs.python.org/issue40386>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40386] Strange behavior during invalid import of modules without if __name__ == "__main__"

2020-04-24 Thread wyz23x2


Change by wyz23x2 :


--
type:  -> behavior

___
Python tracker 
<https://bugs.python.org/issue40386>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40051] Dead link in help(lib2to3/idlelib/turtledemo/tkinter.sub/test_*/?)

2020-05-04 Thread wyz23x2


wyz23x2  added the comment:

Patch?

--

___
Python tracker 
<https://bugs.python.org/issue40051>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40051] Dead link in help(lib2to3/idlelib/turtledemo/tkinter.sub/test_*/?)

2020-05-04 Thread wyz23x2


wyz23x2  added the comment:

OK.

--

___
Python tracker 
<https://bugs.python.org/issue40051>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40511] Yellow hint frame blinks when entering () in strings

2020-05-05 Thread wyz23x2


New submission from wyz23x2 :

The yellow frame blinks as shown in mp4. It's annoying and isn't good to the 
eyes.

--
assignee: terry.reedy
components: IDLE
messages: 368133
nosy: terry.reedy, wyz23x2
priority: normal
severity: normal
status: open
title: Yellow hint frame blinks when entering () in strings
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue40511>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40511] Yellow hint frame blinks when entering () in strings

2020-05-05 Thread wyz23x2

wyz23x2  added the comment:

OMG, request too large. I can't upload mp4 /(ㄒoㄒ)/~~

--

___
Python tracker 
<https://bugs.python.org/issue40511>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40511] IDLE yellow hint frame blinks when entering () in strings

2020-05-05 Thread wyz23x2


Change by wyz23x2 :


--
title: Yellow hint frame blinks when entering () in strings -> IDLE yellow hint 
frame blinks when entering () in strings

___
Python tracker 
<https://bugs.python.org/issue40511>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40511] IDLE yellow hint frame blinks when entering () in strings in functions/classes

2020-05-05 Thread wyz23x2


Change by wyz23x2 :


--
title: IDLE yellow hint frame blinks when entering () in strings -> IDLE yellow 
hint frame blinks when entering () in strings in functions/classes

___
Python tracker 
<https://bugs.python.org/issue40511>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40591] \r broken in IDLE

2020-05-11 Thread wyz23x2


New submission from wyz23x2 :

When you run this code:

import time
for i in range(10):
print(f"\r{i}", end='', flush=True)
time.sleep(1)
print('\n')

On CMD it prints 0 at the first time, then it will erase it and print the 
increased i. But on IDLE it just prints "0123456789" -- that isn't right.

--
assignee: terry.reedy
components: IDLE
messages: 368616
nosy: terry.reedy, wyz23x2
priority: normal
severity: normal
status: open
title: \r broken in IDLE
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue40591>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42578] Add tip when encountering UnicodeDecode/Encode Error in open()

2020-12-05 Thread wyz23x2


New submission from wyz23x2 :

Programmers often stumble over UnicodeDecode/EncodeError during open(), and 
especially beginners don't know what to do.
There are lots of questions on Stackoverflow:
https://stackoverflow.com/questions/16528468/while-reading-file-on-python-i-got-a-unicodedecodeerror-what-can-i-do-to-resol
https://stackoverflow.com/questions/38186847/python-line-replace-returns-unicodeencodeerror
https://stackoverflow.com/questions/3224268/python-unicode-encode-error
https://stackoverflow.com/questions/50331257/python3-unicodeencodingerror
https://stackoverflow.com/questions/24717808/python-cant-write-to-file-unicodeencodeerror
..
Maybe a helpful tip can be added to the error message.
We have done this before:
>>> (1,)(2, 3)  
>>>   :1: SyntaxWarning: 
>>> 'tuple' object is not callable; perhaps you missed a comma?
>>> print 3 
>>> 
  File "", line 1
  
print 3 

  ^ 
  SyntaxError: Missing parentheses 
in call to 'print'. Did you mean print(3)?

--
components: IO
messages: 382567
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: Add tip when encountering UnicodeDecode/Encode Error in open()
versions: Python 3.10, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue42578>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42578] Add tip when encountering UnicodeDecode/Encode Error in open()

2020-12-05 Thread wyz23x2


wyz23x2  added the comment:

>>> (1,)(2, 3)
:1: SyntaxWarning: 'tuple' object is not callable; perhaps you missed a 
comma?

--

___
Python tracker 
<https://bugs.python.org/issue42578>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42578] Add tip when encountering UnicodeDecode/EncodeError in open()

2020-12-05 Thread wyz23x2


Change by wyz23x2 :


--
title: Add tip when encountering UnicodeDecode/Encode Error in open() -> Add 
tip when encountering UnicodeDecode/EncodeError in open()

___
Python tracker 
<https://bugs.python.org/issue42578>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42646] Add function that supports "applying" methods

2020-12-15 Thread wyz23x2


New submission from wyz23x2 :

Doing this is generally very annoying:
y = x.copy()
y.some_method()
Sometimes x doesn't have copy(), so:
from copy import deepcopy
y = deepcopy(x)
y.some_method()

So maybe a function could be added to help.
For example:

def apply(obj, function, /, args=(), kwargs={}):
try:
new = obj.copy()
except AttributeError:
from copy import copy
new = copy(obj)
function(new, *args, **kwargs)
return new
# implement reversed() for list
lis = [1, 2, 3, 4, 5]
arr = apply(lis, list.reverse)
print(arr)  # [5, 4, 3, 2, 1]

apply() maybe isn't the best name because of the builtin apply() in Python 2, 
but that's EOL. It could be added in the standard library.

--
components: Library (Lib)
messages: 383050
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: Add function that supports "applying" methods
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue42646>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42646] Add function that supports "applying" methods

2020-12-15 Thread wyz23x2


wyz23x2  added the comment:

Edit: applied should be the better name because of reversed(), sorted() etc. 
and doesn't conflict with Py 2.

--

___
Python tracker 
<https://bugs.python.org/issue42646>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43097] IndexError msg of random.choice() not helpful

2021-02-01 Thread wyz23x2


New submission from wyz23x2 :

When you apply `random.choice` on empty sequences:
>>> import random
>>> random.choice([])
Traceback (most recent call last):
  File "", line 2, in 
return seq[self._randbelow(len(seq))]
IndexError: list index out of range
This message doesn't clearly state the real problem -- an empty seq.
Meanwhile, many other methods give messages.
>>> [].pop()
Traceback (most recent call last):
  File "", line 3, in 
IndexError: pop from empty list
>>> import collections
>>> collections.deque().popleft()
Traceback (most recent call last):
  File "", line 5, in 
IndexError: pop from an empty deque
>>> random.randrange(0, 0)
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Program Files\Python39\lib\random.py", line 316, in randrange
raise ValueError("empty range for randrange() (%d, %d, %d)" % (istart, 
istop, width))
ValueError: empty range for randrange() (0, 0, 0)

P.S. Both are empty sequences/ranges, randrange() raises ValueError, while 
choice() raises IndexError.

--
components: Library (Lib)
messages: 386128
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: IndexError msg of random.choice() not helpful
versions: Python 3.10, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43097>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41075] Add support of navigating through prev. commands in IDLE

2020-06-22 Thread wyz23x2

New submission from wyz23x2 :

Terminals like CMD have support of navigating through commands with ↑↓. While 
directly implementing the arrows is not good in IDLE (the use for jumping to 
the prev. line in GUI is needed), there should be a good way.
Some ways:
1. Alt+↑↓. The current behavior is exactly like ↑↓.
2. A "Previous input" option in the right-click menu.
3. A "Navigate" option in the right-click menu. A GUI like this will pop up:
——
┃Navigate┃
┃  × The [4]th command   ┃
┃  O [1] command before  ┃
┃___ ┃
┃┃Paste┃ ┃
┃——— ┃
——

It would be better if 2&3 are together.

--
assignee: terry.reedy
components: IDLE
messages: 372085
nosy: terry.reedy, wyz23x2
priority: normal
severity: normal
status: open
title: Add support of navigating through prev. commands in IDLE
type: enhancement
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue41075>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41075] Make support of navigating through prev. commands in IDLE more conspicuous

2020-06-24 Thread wyz23x2


wyz23x2  added the comment:

Doesn't work? The  and  work perfectly in 3.8.3!
Th problem now is that only very few people know it. There should be a clearer 
way.

--
title: Add support of navigating through prev. commands in IDLE -> Make support 
of navigating through prev. commands in IDLE more conspicuous

___
Python tracker 
<https://bugs.python.org/issue41075>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41121] Path sep. in IDLE on Windows changes

2020-06-25 Thread wyz23x2


New submission from wyz23x2 :

Python supports "/" and "\" separators on Windows.
So in IDLE, the path shown sometimes is:
D:\xxx\xxx
Sometimes is:
D:/xxx/xxx

That isn't right.

--
assignee: terry.reedy
components: IDLE
messages: 372395
nosy: terry.reedy, wyz23x2
priority: normal
severity: normal
status: open
title: Path sep. in IDLE on Windows changes
type: behavior
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue41121>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41250] Number separators in different places

2020-07-08 Thread wyz23x2

New submission from wyz23x2 :

The current syntax is this for thousand separators:
f'{var:,}'
It will return this when var is 1234567:
'1,234,567'
But sometimes we need a way to insert them in other places. For example:
123456789 → '1,2345,6789' (4)
62938757312 → '6,29387,57312' (5)
This could be done like this:
Idea 1:
Add a new method to string:
string.sep(num: int_or_float, interval: int_or_iterable = 3, 
   sepchar: str = ',')
>>> import string
>>> string.sep(1234567, 3)
'1,234,567'
>>> string.sep(1234567890, range(1, 4))
'1,23,456,7890'
>>> string.sep('Hello')
TypeError: Invalid number 'Hello'
>>> string.sep(12345678, sepchar=' ')
'12 345 678'
>>> string.sep(123456789, 4, '|')
'1|2345|6789'

Idea 2: (Not as powerful as above)
(Future)
>>> f'{123456789:4,}'
'1,2345,6789'
>>> f'{62938757312:5,}'
'6,29387,57312'
>>> f'{1234567:,}' # Equal to f'{1234567:3,}'
'1,234,567'
(Current)
>>> f'{12345678:5,}' # 5 discarded
'12,345,678'

--
components: Interpreter Core, Library (Lib)
messages: 373367
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: Number separators in different places
versions: Python 3.10, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue41250>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41250] Number separators in different places

2020-07-08 Thread wyz23x2


wyz23x2  added the comment:

Q: Why not use f"{var:,}".replace(',', sepchar) for the sepchar parameter?
A: It is very complicated in the case below:
num = 1234567
text = 'Hello, world!'
print(f"{num:,}{text}").replace(',', ' ') # Becomes '1 234 567Hello world!'
print(f"{f'{num:,}'.replace(',', ' ')}{text}") # Too complicated!
print(f"{num:,}".replace(',', ' ')+text) # Slow!

--

___
Python tracker 
<https://bugs.python.org/issue41250>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41251] __future__.barry_as_FLUFL.getMandatoryRelease() is wrong

2020-07-08 Thread wyz23x2


New submission from wyz23x2 :

__future__.barry_as_FLUFL turns x!=y into x<>y.
But the doc by help() says:
Help on _Feature in module __future__ object:   


class _Feature(builtins.object)
--snip--
|  getMandatoryRelease(self)
  |  Return release in which 
this feature will become mandatory. 
   |
 |  This is a 
5-tuple, of the same form as sys.version_info, or, if   
 |  the feature was dropped, is None. 
--snip--

Since <> is dropped, __future__.barry_as_FLUFL.getMandatoryRelease() should be 
None. But it instead returns (4, 0, 0, 'alpha', 0), which
means it will become default in Python 4 and drop != (!= is invalid
after the __future__ import).
That shouldn't be right.

------
messages: 373369
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: __future__.barry_as_FLUFL.getMandatoryRelease() is wrong

___
Python tracker 
<https://bugs.python.org/issue41251>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41251] __future__.barry_as_FLUFL.getMandatoryRelease() is wrong

2020-07-08 Thread wyz23x2


Change by wyz23x2 :


--
components: +Library (Lib)
versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue41251>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41251] __future__.barry_as_FLUFL.getMandatoryRelease() is wrong

2020-07-08 Thread wyz23x2


wyz23x2  added the comment:

Help on _Feature in module __future__ object:   


class _Feature(builtins.object)
--snip--
|  getMandatoryRelease(self)
|  Return release in which this feature will become mandatory.
|
|  This is a 5-tuple, of the same form as sys.version_info, or, if
| the feature was dropped, is None. 
--snip--

--

___
Python tracker 
<https://bugs.python.org/issue41251>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41251] __future__.barry_as_FLUFL.getMandatoryRelease() is wrong

2020-07-08 Thread wyz23x2


Change by wyz23x2 :


--
type:  -> behavior

___
Python tracker 
<https://bugs.python.org/issue41251>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41075] Make support of navigating through prev. commands in IDLE more conspicuous

2020-07-10 Thread wyz23x2


Change by wyz23x2 :


--
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue41075>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41266] Wrong hint when class methods and builtins named same

2020-07-10 Thread wyz23x2


New submission from wyz23x2 :

There is a function hex(number, /), and float objects have a method hex().
When something like 1.3.hex( is typed, the yellow box's first line contains 
hex(number, /). But the method is actually hex(), no arguments. It confuses 
users.
And when 1.3.list( is typed, there isn't a list() method in floats, but the 
hint still pops up and shows the __doc__ for list(iterable=(), /).

--
assignee: terry.reedy
components: IDLE
messages: 373455
nosy: terry.reedy, wyz23x2
priority: normal
severity: normal
status: open
title: Wrong hint when class methods and builtins named same
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue41266>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-07-14 Thread wyz23x2


Change by wyz23x2 :


--
versions: +Python 3.10

___
Python tracker 
<https://bugs.python.org/issue40360>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41313] OverflowError still raised when int limited in sys.maxsize

2020-07-16 Thread wyz23x2


New submission from wyz23x2 :

Consider this code:
import sys
sys.setrecursionlimit(sys.maxsize)
Causes this:
OverflowError: Python int too large to convert to C int
So what is the limit? It should be sys.maxsize.
These 2 also don't work:
sys.setrecursionlimit(sys.maxsize-1)
sys.setrecursionlimit(sys.maxsize//2)
That is a big difference with at least 50%.

--
components: C API, Library (Lib)
messages: 373747
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: OverflowError still raised when int limited in sys.maxsize
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue41313>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41313] OverflowError still raised when int limited in sys.maxsize

2020-07-16 Thread wyz23x2


wyz23x2  added the comment:

Needs to add 10 zeros (sys.maxsize//100) to get it work. //200 
doesn't work.
Python version: 3.8.4
Platform: Windows 10 2004

--

___
Python tracker 
<https://bugs.python.org/issue41313>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41313] OverflowError still raised when int limited in sys.maxsize

2020-07-16 Thread wyz23x2


wyz23x2  added the comment:

Tested. 2**31-31 is the max, which is 2147483617, compared to sys.maxsize's 
9223372036854775807!

--
type:  -> behavior

___
Python tracker 
<https://bugs.python.org/issue41313>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-07-16 Thread wyz23x2


Change by wyz23x2 :


--
type:  -> crash

___
Python tracker 
<https://bugs.python.org/issue40477>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41314] __future__ doc and PEP 563 conflict

2020-07-16 Thread wyz23x2


New submission from wyz23x2 :

In https://docs.python.org/3/library/__future__.html:
annotations | 3.7.0b1 | *4.0* | PEP 563: Postponed evaluation of annotations

In PEP 563:
Starting with Python 3.7, a __future__ import is required to use the described 
functionality. No warnings are raised.

In Python *3.10* this will become the default behavior. Use of annotations 
incompatible with this PEP is no longer supported.

Python 4.0 or 3.10? Not clear.

--
messages: 373753
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: __future__ doc and PEP 563 conflict

___
Python tracker 
<https://bugs.python.org/issue41314>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41314] __future__ doc and PEP 563 conflict

2020-07-16 Thread wyz23x2


Change by wyz23x2 :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
versions: +Python 3.10, Python 3.7

___
Python tracker 
<https://bugs.python.org/issue41314>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >