Re: variable scope of class objects

2015-10-21 Thread JonRob
@Dennis, Thanks for your example. My structure is very similar. Perhaps I was reading too much into Luca's below statement regarding declaring variables. Regards, JonRob Luca wrote... >Please, note that declaring a variable in the constructor is only a >convention: in Pyt

Re: variable scope of class objects

2015-10-20 Thread JonRob
e the best method to structure such code? Regards JonRob On Tue, 20 Oct 2015 08:17:16 +0200, Luca Menegotto wrote: >Il 19/10/2015 20:39, JonRob ha scritto: > >> I (think) I understand that in the below case, the word self could be >> replaced with "BME280" to explicit

Re: variable scope of class objects

2015-10-20 Thread JonRob
l was lost while I was trying to bookmark it. Regards, JonRob On Mon, 19 Oct 2015 15:01:14 -0400, Random832 wrote: >jon...@mail.python.org writes: >> >> The below pseudo code is distilled from my 1st attempt at a functional >> Python program on the RasPi. >> >

variable scope of class objects

2015-10-19 Thread JonRob
e RasPi. My questions are: What is the scope of class variables? does the self. prefix modify this scope? Thanks Regards JonRob #!/usr/bin/python # -- developed using Python 2.7.3 class BME280: # all the below are class variables # those preceded by an underscore are predefined to some cons