New submission from soyoo <[email protected]>:
import re
src = "123" # can be anything
t = re.sub(".*", "*", src)
"""
The output of 't' is different in python2 and python3;
When python version is python3, it's depend on OS version.
When python version is python2, it seem always output single '*'.
When python version is python3, and OS is Linux, it output single '*';
When python version is python3, and OS is Mac or windows, it output double '**'.
"""
----------
components: 2to3 (2.x to 3.x conversion tool)
files: python3 on windows.png
messages: 375741
nosy: soyoo
priority: normal
severity: normal
status: open
title: t = re.sub(".*", "*", src) has different ouput
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file49418/python3 on windows.png
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue41605>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com