On Thu, Jun 24, 2021 at 2:12 PM tbp1...@gmail.com <tbp100...@gmail.com>
wrote:

> Would you give an example of how these slots would be used, please?
>

Good question. Typical Leo users will not notice any change whatsoever.

The only sense in which slots are "used" is that slots prevent scripts (or
any part of Leo itself) from "injecting" new ivars into the classes. This
restriction allows pylint  and mypy to detect misspellings and other
serious errors.

The VNode class already has an extension mechanism, namely
v.unknownAttributes. That should be plenty good enough.

The Position class should never ever need any kind of extension, so adding
slots is protection, pure and simple.

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/CAMF8tS3%3D-JFGXZ29TNeNAhcj4v9xdzW0PTxe%3DXK1238Zv0M8rw%40mail.gmail.com.

Reply via email to