New submission from Serhiy Storchaka <[email protected]>:
I need to test whether the string is interned for Python implementations of
marshal.dumps(). It is easy to do in C, and I suggest to expose this
functionality to Python.
Currently you can test if the string is interned using the following function:
def isinterned(s):
return sys.intern(s) is s
But it has a side effect -- it interns a string if it is not equal to an
already interned string.
----------
components: Interpreter Core
messages: 323473
nosy: rhettinger, ronaldoussoren, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Add sys.isinterned()
type: enhancement
versions: Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue34392>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com