New submission from bizywizy <bizy...@gmail.com>:

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 <rep...@bugs.python.org>
<https://bugs.python.org/issue39354>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to