DEV Community

Discussion on: Using Python Functions As Classes

Collapse
 
stealthmusic profile image
Jan Wedel • Edited

I‘ve written a Python interpreter in Java once where I learned that really everything is an object in python.

I usually ask in job interviews „what’s the difference between Java and Python“ and most candidates say „Java is object-oriented and Python is a scripting language“ :)

Collapse
 
abdurrahmaanj profile image
Abdur-Rahmaan Janhangeer

you are in language making? really awesome!

Collapse
 
stealthmusic profile image
Jan Wedel

Oh no, I only wrote an interpreter that executed precompiled Python code! I did this once as a PoC to run Python on an embedded device. It worked but unfortunately as you might imagine, interpreting Python Byte code in Java which was also interpreted byte code on a slow embedded device was terrible slow.

The point is: I learned how beautifully Python is designed internally.
As you stated: everything’s an object

  • numbers, strings
  • methods
  • classes
  • modules
  • code blocks

This is truly amazing!

Thread Thread
 
abdurrahmaanj profile image
Abdur-Rahmaan Janhangeer

hum ok, embedded programming is another level for me _