variable scope of class objects

Nagy László Zsolt gandalf at shopzeus.com
Tue Oct 20 01:31:02 EDT 2015


>
> #!/usr/bin/python
> # -- developed using Python 2.7.3
>
> class BME280:

Not strictly related to the question, but you probably want to use so
called "new style classes" when developing a new program for Python
version 2. In other words, use:

class BME280(object):

instead of

class BME280:





More information about the Python-list mailing list