Nitpicking and minor suggestions · Issue #30 · satwikkansal/wtfpython · GitHub
Skip to content

Nitpicking and minor suggestions #30

Description

@uranusjr

3 --0-- 5 == 8 and --5 == 5 are both semantically correct statements and evaluate to True.

Might want to add that ++a and --a are both valid Python (given a is a number), but isn’t what you probably think they are (increment/decrement).

'a'[0][0][0][0][0] is also a semantically correct statement as strings are iterable in Python.

This is possible because strings are sequences, not iterables (although they are iterables as well).

Multiple Python threads don't run concurrently (yes you heard it right!).

This is not accurate. Python threads do run concurrently, but can’t run Python code concurrently. A thread can execute if another is in the middle of non-Python code execution (e.g. waiting for the response of a network call).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions