[pypy-commit] cffi default: Add a warning about "x[:]=string" (thanks David).
arigo
noreply at buildbot.pypy.org
Fri Feb 15 15:19:20 CET 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r1158:66a586f814c3
Date: 2013-02-15 15:19 +0100
http://bitbucket.org/cffi/cffi/changeset/66a586f814c3/
Log: Add a warning about "x[:]=string" (thanks David).
diff --git a/doc/source/index.rst b/doc/source/index.rst
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -1368,6 +1368,9 @@
As with indexing, negative bounds mean really negative indices, like in
C. As for slice assignment, it accepts any iterable, including a list
of items or another array-like cdata object, but the length must match.
+ (Note that this behavior differs from initialization: e.g. if you pass
+ a string when assigning to a slice of a ``char`` array, it must be of
+ the correct length; no implicit null character is added.)
.. versionchanged:: 0.6
`(*****)` Enums are now handled like ints (unsigned or signed, int or
More information about the pypy-commit
mailing list