Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot reproduce "wtf"*bool example #57

Closed
Plumbob opened this issue Jan 26, 2018 · 1 comment
Closed

Cannot reproduce "wtf"*bool example #57

Plumbob opened this issue Jan 26, 2018 · 1 comment

Comments

@Plumbob
Copy link

Plumbob commented Jan 26, 2018

In Part 3 of "What is wrong with booleans?" there's the following example:

>>> some_bool = True
>>> "wtf"*some_bool
'wtf'
>>> "wtf"*some_bool
''

I'm unable to reproduce this with either 2.7.10 nor 3.6.4:

Python 2.7.10 (default, Jul 15 2017, 17:16:57) 
IPython 5.5.0 -- An enhanced Interactive Python.

In [1]: some_bool = True

In [2]: "wtf"*some_bool
Out[2]: 'wtf'

In [3]: "wtf"*some_bool
Out[3]: 'wtf'    

Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28)
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: some_bool = True

In [2]: "wtf"*some_bool
Out[2]: 'wtf'

In [3]: "wtf"*some_bool
Out[3]: 'wtf'

Great work collecting all these examples. Thank you for doing this.

@satwikkansal
Copy link
Owner

Oh, that's my fault actually. It's missing a statement some_bool = False. Fixed it right away! Thanks for pointing it out @Plumbob and I'm glad that you liked the project.

muscliary pushed a commit to muscliary/wtfpython that referenced this issue Sep 12, 2023
tothetop430 added a commit to tothetop430/wtfpython that referenced this issue Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants