If using __slots__ doesn't prevent __dict__ from being created for an instance of a class, is there any benefit to using them?pythoncoder wrote: ↑Sat Aug 03, 2019 6:19 amThis has been discussed here. As far as I can see it hasn't been implemented in the official build (unfortunately).
Search found 61 matches
- Wed Aug 21, 2019 1:02 am
- Forum: ESP8266 boards
- Topic: Unexpected __slots__ behavior
- Replies: 5
- Views: 3620
Re: Unexpected __slots__ behavior
- Sun Aug 11, 2019 2:08 pm
- Forum: ESP8266 boards
- Topic: sta_if.isconnected() unexpectedly returns false
- Replies: 7
- Views: 24962
Re: sta_if.isconnected() unexpectedly returns false
Excellent write up! I'm actually doing all the things you talked about already. I'm just surprised that so many outages are considered normal.
- Sun Aug 11, 2019 3:26 am
- Forum: ESP8266 boards
- Topic: my script gets blocked when there's a watchdog
- Replies: 2
- Views: 2252
Re: my script gets blocked when there's a watchdog
Are you asking about this error?
If so then you need to call main as a function. and make sure you use the correct import syntax. Instead of:
Use
Code: Select all
AttributeError:'module' object has no attribute' main
Code: Select all
Metro import
Meteo.main
Code: Select all
import Metro
Meteo.main()
- Sun Aug 11, 2019 3:17 am
- Forum: ESP8266 boards
- Topic: sta_if.isconnected() unexpectedly returns false
- Replies: 7
- Views: 24962
sta_if.isconnected() unexpectedly returns false
MicroPython v1.11-223-g71ba86b4c In my main processing loop seen below, I check between every loop iteration to verify there is a valid Wi-Fi connection: async def main_loop(): sta_if = network.WLAN(network.STA_IF) sock = None poller = None while True: try: # This continuously try to create a Wi-Fi ...
- Sun Aug 11, 2019 2:46 am
- Forum: ESP8266 boards
- Topic: Help deciphering WDT reset error
- Replies: 2
- Views: 2263
Re: Help deciphering WDT reset error
See my reply to the other thread, but yes this could very well be caused by increasing the heap size too far. I optimized my code and was able to reduce the heap size back to the stock value. I'm still seeing errors similar to this sometimes though. I'm trying to eliminate causes, but it is taking ...
- Sun Aug 11, 2019 2:36 am
- Forum: ESP8266 boards
- Topic: Determine socket type
- Replies: 3
- Views: 2264
Re: Determine socket type
This is not currently implemented. I guess they left it out for space reasons because you'd assume that whatever created the socket either knew what type it was at creation, or it was accept'ed from a known socket type. If you were interested in implementing this yourself, look at modlwip.c. The un...
- Wed Aug 07, 2019 4:53 am
- Forum: ESP8266 boards
- Topic: Determine socket type
- Replies: 3
- Views: 2264
Determine socket type
In CPython the type of a socket (TCP stream or UDP datagram) can be determined with socket.type : import socket if s.type is socket.SocketKind.SOCK_STREAM: # do stuff with TCP socket elif s.type is socket.SocketKind.SOCK_DGRAM: # do stuff with UDP socket Unfortunately it appears that the "type" attr...
- Sat Aug 03, 2019 2:59 am
- Forum: ESP8266 boards
- Topic: A concrete QSTR example
- Replies: 2
- Views: 1947
Re: A concrete QSTR example
Good to know.
- Fri Aug 02, 2019 10:01 pm
- Forum: ESP8266 boards
- Topic: Micropython crashing and rebooting every 9seconds
- Replies: 26
- Views: 15831
Re: Micropython crashing and rebooting every 9seconds
Hi again, I've now tried all of your suggestions, but sadly to no avail. Still the same exact issue no matter what I try. I even ordered new cables from Amazon to try, and got a hold of a third computer to try from, but nothing. The one thing I still want to try is to go somewhere where there is no...
- Fri Aug 02, 2019 8:11 pm
- Forum: ESP8266 boards
- Topic: A concrete QSTR example
- Replies: 2
- Views: 1947
A concrete QSTR example
QSTR is mentioned a lot in this forum, but other than a short blurb about it under the "Storing strings in flash" section here there doesn't seem to be any concrete examples. I imported my main module and ran the command micropython.qstr_info(1) and the only thing it returned was the name of the mod...