Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
b3224875
Kaydet (Commit)
b3224875
authored
Haz 29, 2010
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
group cStringIO docs under its factory function
üst
86aa9053
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
18 deletions
+23
-18
stringio.rst
Doc/library/stringio.rst
+23
-18
No files found.
Doc/library/stringio.rst
Dosyayı görüntüle @
b3224875
...
...
@@ -71,24 +71,29 @@ The module :mod:`cStringIO` provides an interface similar to that of the
made more efficient by using the function :func:`StringIO` from this module
instead.
Since this module provides a factory function which returns objects of built-in
types, there's no way to build your own version using subclassing. It's not
possible to set attributes on it. Use the original :mod:`StringIO` module in
those cases.
Unlike the memory files implemented by the :mod:`StringIO` module, those
provided by this module are not able to accept Unicode strings that cannot be
encoded as plain ASCII strings.
Calling :func:`StringIO` with a Unicode string parameter populates
the object with the buffer representation of the Unicode string, instead of
encoding the string.
Another difference from the :mod:`StringIO` module is that calling
:func:`StringIO` with a string parameter creates a read-only object. Unlike an
object created without a string parameter, it does not have write methods.
These objects are not generally visible. They turn up in tracebacks as
:class:`StringI` and :class:`StringO`.
.. function:: StringIO([s])
Return a StringIO-like stream for reading or writing.
Since this is a factory function which returns objects of built-in types,
there's no way to build your own version using subclassing. It's not
possible to set attributes on it. Use the original :mod:`StringIO` module in
those cases.
Unlike the :mod:`StringIO` module, this module is not able to accept Unicode
strings that cannot be encoded as plain ASCII strings. Calling
:func:`StringIO` with a Unicode string parameter populates the object with
the buffer representation of the Unicode string instead of encoding the
string.
Another difference from the :mod:`StringIO` module is that calling
:func:`StringIO` with a string parameter creates a read-only object. Unlike an
object created without a string parameter, it does not have write methods.
These objects are not generally visible. They turn up in tracebacks as
:class:`StringI` and :class:`StringO`.
The following data objects are provided as well:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment