Re: Python project delays changes to annotations

2021-06-27 Thread Edward K. Ream
On Sun, Jun 27, 2021 at 5:14 PM David Szent-Györgyi 
wrote:

> Edward writes:
>
>> I'm not worried. A few searches/replaces would likely do the trick.
>>
>
> That's good to hear. That tells me that you are sure that you can follow
> as mypy adapts to the changes that follow PEP 649.
>

I have no intention of wading through the details of 649.

Right now, mypy is surprisingly intuitive and easy to use. I just finished
fully annotating leoAst.py, and I can say that using strings to handle
forward references is fine.

There are many possible future pitfalls that we could discuss, but I'd
rather not :-) Let's leave future problems for the future.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS195-%2Bk0ZnbEiuF3VJAy28F3bWjKP1DZyPvK7mKLqOP8A%40mail.gmail.com.


Re: Python project delays changes to annotations

2021-06-27 Thread David Szent-Györgyi
Edward writes:

> I'm not worried. A few searches/replaces would likely do the trick.
>

That's good to hear. That tells me that you are sure that you can follow as 
mypy adapts to the changes that follow PEP 649. 

What interests me is that the Python development community has not settled 
on a solution to the problems posed by forward references. Those developers 
are *so* far from stupid that my first assumption must be that there's more 
to this than appears at the outsider's first glance. Such a first glance 
led me to suggest simply separating text annotations from the mechanisms 
described in PEP 649, but I am not an implementor of Python! 

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/25684c21-6756-47ed-9e27-e3e31af6f39fn%40googlegroups.com.


Re: Discuss: use slots for all classes in leoNodes.py

2021-06-27 Thread Edward K. Ream


On Thursday, June 24, 2021 at 12:48:33 PM UTC-5 Edward K. Ream wrote:

> This is PR #2003  and 
> issue #2004 .
>
> Unless I hear compelling arguments against, I plan to "freeze" all the 
> classes in leoNodes.py (Position, VNode, NodeIndices and PosList classes) 
> by defining a __slot__ attribute 
> for each 
> class.  It is straightforward to do this.  See PR #2003.
>

The new code has now been merged into devel.

In the *extremely* unlikely event that slots ever cause problem, removing 
them from a class is simply a matter of eliminating the class's __slot__ 
statement.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/8120c5c3-fd4a-4812-b363-3f0c2f649eb2n%40googlegroups.com.