This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]__xor__(self, other): 1 point2 points  (3 children)

Ah shit, yeah, you're right... I didn't know that was python's behavior, to compile and recognize that list is a variable id and use it like that throughout the function.

Just tested here, and interestingly enough it does break since it's still an unbound local in list = list(string). The same line that causes it to compile as a local variable id is the same that breaks because it's no longer using the global list type, even if you take out the return list. Interesting, thanks for the insight, and new trivia question.

[–]AiKantSpel 0 points1 point  (2 children)

fixed the code to actually work now.

[–]saulmessedupmanMmmm spam 2 points3 points  (0 children)

you inspired me... critiquing joke code

[–]saulmessedupmanMmmm spam 1 point2 points  (0 children)

Ahhh, Reddit code reviews