Message183111
On Tue, Feb 26, 2013 at 8:08 PM, Ezio Melotti <report@bugs.python.org>wrote:
>
> Ezio Melotti added the comment:
>
> > The next logical step is to make all test classes in test_xml_etree
> > accept the ET module in some way and store it, using it to get classes
> > & function. I.e. no more global "ET" and "pyET" at all.
>
> The idiom suggested by PEP 399 has the two modules (cmod and pymod) as
> globals, and then simply sets them as class attributes. Is there any
> reason why this should be avoided in this case?
>
I'm just not sure how the globals help except for saving 2-3 lines of code.
I do see how they can cause problems because even when I just want to run
the pure Python code, the C module gets imported. Why should it be? I
really don't want it to, I want to isolate things as much as possible
(after all, testing the pure Python module actually tests a scenario where
there is no C module). Pickle is one concrete place that can cause problems
with this.
We talked about related things in Issue #15083 and AFAIR Eric's and Brett's
proposals move these modules away from the global namespace. |
|
Date |
User |
Action |
Args |
2013-02-27 04:40:59 | eli.bendersky | set | recipients:
+ eli.bendersky, ncoghlan, ezio.melotti, Arfrever, asvetlov, flox, tshepang, python-dev, serhiy.storchaka, danielsh |
2013-02-27 04:40:59 | eli.bendersky | link | issue15083 messages |
2013-02-27 04:40:58 | eli.bendersky | create | |
|