Hi Python Developers, print() function has a slight design issue, when user gives start and end positions of character array.Issue: >>> str_ary="abcdef" >>> print(str_ary[1]) b >>> print(str_ary[4]) e >>> print(str_ary[1:4]) bcd >>> In the above scenario, user is expecting that output of print function will be bcde (not bcd). Analysis: I kind of figured out what could be the issue. To get the string slice, "between" (or equivalent) was used. i.e. str_ary array position >=1 and < 4 Solution: User experience will be better if the code is updated to get last character. i.e str_ary array position >=1 and <= 4 Note: To keep the code as backward compatibility, you may come up with different name like printf() ThanksRavi Yarlagadda -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20170308/92ecd057/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4