Thanks!fma wrote:I like your approach!
Module for TMP102 temperature sensor
-
- Posts: 19
- Joined: Mon Jun 09, 2014 1:54 pm
Re: Module for TMP102 temperature sensor
-
- Posts: 19
- Joined: Mon Jun 09, 2014 1:54 pm
Re: Module for TMP102 temperature sensor
Before I submit any more bugs I should probably learn to build the project and flash the board and all that good stuff - it probably is fixed as you say, but I'm still running the version of micropython that came on my board and I haven't tried the unix version or anything.pfalcon wrote:Yes, all constant strings which appear in script are interned. But again, we made change that expressions consisting of just strings (which covers docstrings) are discarded. Submitting a bug for this issue will make sure it's revisited and not forgotten.I guess string constants are retained even if they are not being referenced by anything?
-
- Posts: 19
- Joined: Mon Jun 09, 2014 1:54 pm
Re: Module for TMP102 temperature sensor
I flashed my board and it looks like that issue with the docstrings is at least partially resolved - space is allocated for them on import, but the garbage collector removes them when it runs. Seems adequate to me? I will log a bug if you disagree.
Re: Module for TMP102 temperature sensor
Hmm, I'd guess parser could free such strings explicitly, saving gc from extra work, so I'd suggest filing a bug.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
-
- Posts: 19
- Joined: Mon Jun 09, 2014 1:54 pm
-
- Posts: 288
- Joined: Sun May 04, 2014 8:54 am
Re: Module for TMP102 temperature sensor
This means that we should include docstrings in micropython modules, right?
Re: Module for TMP102 temperature sensor
You can, and you should not be concerned that they may waste memory when run on MicroPython (they won't).
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/