Changes between Initial Version and Version 1 of Ticket #27308, comment 2
- Timestamp:
- Oct 3, 2016, 5:24:17 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #27308, comment 2
initial v1 6 6 The main point is to catch bugs due to mixing bytes vs str. Also, how many times have you done in Python 3 this type of bug: 7 7 {{{ 8 >>> def create_ key(param1):8 >>> def create_redis_key(param1): 9 9 ... return "foo:bar:" + str(param1) 10 10 ... … … 14 14 But if param1 comes from e.g. a network socket and you forget to decode the bytes: 15 15 {{{ 16 >>> create_ key(b"zbr")16 >>> create_redis_key(b"zbr") 17 17 "foo:bar:b'zbr'" 18 18 }}}