[issue34461] Availability of parsers in etree initializer
nilanjan roy added the comment: @serhiy.storchaka: If I concur with your comment then probably declaration of *__all__** over xml initializer(__init__) is little contradictory - because whenever we declare __all__ to enable global-scope means API provides the flexibility to use * during package import. Now this is totally depends on developer how the script need to optimize/simulate during development. Yes agree * should not be used due to high reference of memory usage. But as far __init__.py of xml and python convention this should not be explicitly restricted -- ___ Python tracker <https://bugs.python.org/issue34461> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34461] Availability of parsers in etree initializer
nilanjan roy added the comment: @scoder: *xml* package organization have little confusion 1. Current xml have exposed all the sub-packages from *__all__* scope from the initializer - so there are possibilities to write code from script a. *import xml as x* or *import xml.somepackage as x* => which is also possible even if I do not declare the sub-packages from *__all__* scope of an initializer b. as all the subpackages are available in xml initialzer scope- so this is allowed to developer to write *from xml import ** - but this flexibility will not work(which is contradictory) as each of sub-package initializer doesn't have any inclusion(which i have included in PR) Regards, -- ___ Python tracker <https://bugs.python.org/issue34461> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34461] Availability of parsers in etree initializer
New submission from nilanjan roy : As xml package make the availability of separate global name-space by *__all__* so considerably *etree* should have included of all the parser files in its initialize(i.e. in *__init__.py*). So if any script consider as "from xml import *" then *etree* should have accessibility on all of it's parser files i.e. etree should access like *etree.ElementTree* which is not working as expected currently. Currently it's enforced to use as normal behavior as "import xml.etree.ElementTree" -- components: XML messages: 323872 nosy: nilanjan roy priority: normal severity: normal status: open title: Availability of parsers in etree initializer type: behavior versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue34461> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com