@@ -345,6 +345,8 @@ APIs:
345
345
This is the recommended way to allocate a new Unicode object. Objects
346
346
created using this function are not resizable.
347
347
348
+ On failure returns ``NULL`` and sets an exception.
349
+
348
350
.. versionadded:: 3.3
349
351
350
352
@@ -529,6 +531,10 @@ APIs:
529
531
530
532
Return the length of the Unicode object, in code points.
531
533
534
+ This function checks that *unicode * is a Unicode object, in contrast to
535
+ :c:func: `PyUnicode_GET_LENGTH `, which performs no error checking. On error
536
+ returns ``-1 `` and sets an exception.
537
+
532
538
.. versionadded :: 3.3
533
539
534
540
@@ -572,6 +578,8 @@ APIs:
572
578
not out of bounds, and that the object can be modified safely (i.e. that it
573
579
its reference count is one).
574
580
581
+ Return ``0`` on success, ``-1`` on error with an exception set.
582
+
575
583
.. versionadded:: 3.3
576
584
577
585
@@ -581,6 +589,8 @@ APIs:
581
589
Unicode object and the index is not out of bounds, in contrast to
582
590
:c:func: `PyUnicode_READ_CHAR `, which performs no error checking.
583
591
592
+ Return character on success, ``-1 `` on error with an exception set.
593
+
584
594
.. versionadded :: 3.3
585
595
586
596
@@ -589,6 +599,7 @@ APIs:
589
599
590
600
Return a substring of *str *, from character index *start * (included) to
591
601
character index *end* (excluded). Negative indices are not supported.
602
+ Returns ``NULL`` and sets an exception on error.
592
603
593
604
.. versionadded:: 3.3
594
605
0 commit comments