Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 6
    Why do you think Python ever needs to "determine the data type"? Python is a dynamically-typed language; a type will only be checked when you ask specifically, and can very continually over the life of a variable. And I highly doubt the difference in execution time between Python and Java is due to runtime type checking. Commented Nov 23, 2018 at 15:15
  • So even during the translation from Bytecode to Machine Code Python does not know the type of a variable? AD 2: What then makes the biggest difference in execution time between Python and Java? Commented Nov 23, 2018 at 15:26
  • No, how can it? The program itself can change the type of a variable at any time, that is what dynamic typing means. This code is perfectly legal: a = 'mystring'; a = MyClassThatIsNotAString(). What is the type of a? Commented Nov 23, 2018 at 15:28
  • 1
    I found this resource while searching for an answer to your question. Maybe you will find it useful. Commented Nov 23, 2018 at 15:29
  • 1
    I have yet to thoroughly understand this article, but it is much shorter, and I think it answers your question. Commented Nov 23, 2018 at 15:46