New submission from Liang-Bo Wang:

In Tutorial "An Informal Introduction" section, character is introduced as a 
string of size one. It may be true for python 2.x, where str can be interpreted 
as bytes. However in Python 3, strings are unicode thus the size and the length 
of a string are usually not the same. Also, using size of a string can be 
confused with the result returned by sys.getsizeof(mystr), where 
sys.getsizeof('a') != 1. 

Therefore using "a string of length one" to describe a character may be less 
confusing. The patch attached changes the wording.

----------
assignee: docs@python
components: Documentation
files: docs_tutorial_introduction_str.diff
keywords: patch
messages: 281678
nosy: ccwang002, docs@python
priority: normal
severity: normal
status: open
title: Describe character as a string of length one instead of size one in 
tutorial
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45634/docs_tutorial_introduction_str.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28798>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to