0

I use Ruby on a daily basis and know it is a purely object oriented language. As far as I know, pure object oriented languages' distinguishable characteristic is that all variables are objects, even ints, floats, chars, etc that would be found as primitive types in other languages like Java.

Is Python the same way? I always knew Python as a general purpose object oriented/functional/procedural language that is also good for scripting, but I never thought that it could be purely OO.

Anyone have any explanations?

StanMarsh
  • 487
  • 1
  • 6
  • 16
  • Relevant: http://stackoverflow.com/questions/29099/what-makes-a-language-object-oriented – QuestionC May 08 '14 at 21:20
  • Also informative: http://stackoverflow.com/q/894502/10077 – Fred Larson May 08 '14 at 21:26
  • Whoops, didn't see the "is everything an object in python" question. I guess it didn't pop up in the "Questions that may already have your answer" section since the wording was different.. – StanMarsh May 08 '14 at 22:30

1 Answers1

3

Yes, all values in Python are objects, including integers, floats, functions, classes, and None. I've never heard it described as a "Pure" Object-oriented language, but it seems to meet your description of one.

ApproachingDarknessFish
  • 14,133
  • 7
  • 40
  • 79