Timeline for Why is the element type in the list data_from.scenes changing to another type?
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 17, 2023 at 7:26 | comment | added | Harry McKenzie♦ | @Gorgious hey that's actually a very good point, i didn't realize it indeed is out of scope and python didn't throw an error. | |
Jan 16, 2023 at 20:09 | comment | added | Gorgious |
It doesn't really surprise me much, with makes it an inner scope than the global scope, and you're accessing data_from when this scope has been closed, which is not prevented by python, but can lead to funky behaviour, because you don't have a say in what happens when the with scope closes. Basically it's a wrapper like python decorators that executes some arbitrary code written elsewhere when its scope finishes.
|
|
Jan 15, 2023 at 8:07 | answer | added | Chris | timeline score: 2 | |
Jan 15, 2023 at 5:11 | history | asked | Harry McKenzie♦ | CC BY-SA 4.0 |