Skip to content
Discussion options

You must be logged in to vote

Ugh, it is really hard to tell you what is going on without seeing what exactly you were doing/trying to do.

Why in a class does spi.write('hello') become self._spi_write('hello')??

The spi.write() is provided by the machine module and it provides only a basic communication protocol. The _spi_write() is provided by the ulora module and it includes some setups for the lora device and uses spi.write() to communicate with the lora device. These are two different functions with different purpose, hence one never became another.

My understanding is that self._spi is private but why does it change to spi_write?

To my knowledge, there is no "private" function like Java in Python. The "_" at …

Replies: 3 comments 38 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by davefes
Comment options

You must be logged in to vote
35 replies
@davefes
Comment options

@davefes
Comment options

@davefes
Comment options

@rkompass
Comment options

@davefes
Comment options

Comment options

You must be logged in to vote
3 replies
@rkompass
Comment options

@rkompass
Comment options

@davefes
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants