Python Forum
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
there is no str.isspecial()
#11
whatever PyTypeObject's set to:
Quote:PyTypeObject
    The C structure of the objects used to describe built-in types.Unicode Type

These are the basic Unicode object types used for the Unicode implementation in Python:

Py_UCS4
Py_UCS2
Py_UCS1

    These types are typedefs for unsigned integer types wide enough to contain characters of 32 bits, 16 bits and 8 bits, respectively. When dealing with single Unicode characters, use Py_UCS4.

    New in version 3.3.

Py_UNICODE

    This is a typedef of wchar_t, which is a 16-bit type or 32-bit type depending on the platform.

    Changed in version 3.3: In previous versions, this was a 16-bit type or a 32-bit type depending on whether you selected a “narrow” or “wide” Unicode version of Python at build time.

PyASCIIObject
PyCompactUnicodeObject
PyUnicodeObject

    These subtypes of PyObject represent a Python Unicode object. In almost all cases, they shouldn’t be used directly, since all API functions that deal with Unicode objects take and return PyObject pointers.
    New in version 3.3.

PyTypeObject PyUnicode_Type
    This instance of PyTypeObject represents the Python Unicode type. It is exposed to Python code as str.
Reply
#12
Seems to me we're mixing apples and oranges here. I would think that to Python, 'normal' would be any printable character (defined by string.printable ), corresponding to the Basic ASCII Table (minus some control characters). The first 128 Unicode characters in the Basic Multilingual Plane also correspond to the same Basic ASCII Table. So to my way of thinking, anything above decimal 127 would be a 'special' character.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#13
maybe 'normal' characters are those that have some kind of semantics in python source code
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#14
I think the special characters are 'behorstu '.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#15
i googled that.  it found this page and a couple of german pages.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020