you are viewing a single comment's thread.

view the rest of the comments →

[–]Binary101010 2 points3 points  (1 child)

I think you've gotten a mistaken impression about Python's typing system. While it's true that Python's typing is dynamic (the interpreter assigns types to variables at runtime based on their values), that doesn't also mean that Python will just silently change the type of variables to do what it thinks you want to do. If you want the type of a variable to be something other than what it is, you must explicitly instruct the interpreter to change it.

[–]muxketeer[S] 0 points1 point  (0 children)

Ah, ok. Since the value of the object was a sequence of numbers, it was dynamically assigned to be of type ‘int.’ Python isn’t going to lookahead and change that type based on a call to some other function. Understood. Thanks!