Python is a regular language, which means that function definitions, class definitions, import statements etc. mostly work at any scope. But there’s an exception for “from ... import *
“, which can’t be used inside a function. The reason why turns out to reveal something interesting about the internals of Python.
Month: September 2018
Python basics: Bytecode
tim September 2, 2018 No Comments Internals Bytecode
In future posts I want to delve into some of the internals of Python, and in order to demonstrate what’s going on I’m going to be taking apart some bytecode. In this post I’ll go over some of the basics, so if you’ve never looked at Python bytecode before this is the place to start.
Page 1 of 1