PHP and P++
PHP and P++
Posted Aug 16, 2019 10:39 UTC (Fri) by h2g2bob (subscriber, #130451)In reply to: PHP and P++ by juliank
Parent article: PHP and P++
enable_foo = b'true'
if enable_foo == u'true':
...
Obviously enable_foo is from one or more read() or recv() in a different module. Or from ctypes. Or from users of your library code.
Posted Aug 16, 2019 11:03 UTC (Fri)
by juliank (guest, #45896)
[Link] (1 responses)
Posted Aug 18, 2019 3:00 UTC (Sun)
by k8to (guest, #15413)
[Link]
That sounds probably useful for most code i write, and it would cause huge explosions in most code I have to work on that other people write. Probably a good idea all around.
Posted Aug 18, 2019 23:25 UTC (Sun)
by mjblenner (subscriber, #53463)
[Link]
python3 -bb
>>> b'true' == 'true'
PHP and P++
PHP and P++
PHP and P++
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
BytesWarning: Comparison between bytes and string