[issue39354] collections.UserString format and format_map return a string

2020-01-16 Thread bizywizy


New submission from bizywizy :

collections.UserString.format and collections.UserString.format_map return a 
string instaed of UserString.

This is quite weird because I expect that the %-syntax and `format` method have 
to produce the same result.

```
>>> isinstance(UserString('Hello %s') % 'World', UserString)
True
>>> isinstance(UserString('Hello {}').format('World'), UserString)
False
```

--
components: Library (Lib)
messages: 360101
nosy: bizywizy
priority: normal
severity: normal
status: open
title: collections.UserString format and format_map return a string
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

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



[issue39354] collections.UserString format and format_map return a string

2020-01-16 Thread bizywizy


Change by bizywizy :


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

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