Message109059
> > You can make the dictionary values as lists for the 'blocked'
> > argument for import_fresh_module(). That would work [for io].
>
> I don't understand how having multiple modules in the blocked list
> will help in io case. io.py will simply not work if _io is blocked.
Which you avoid by giving an empty list of blocked modules, using
Alexandre's suggestion.
> I don't like that approach because it makes pure python code hard to
> discover.
Ok, but this code exists and it would be much better if it were
supported.
> The io/_pyio approach also prevents io.py from bring used by
> alternative python implementations unmodified.
It would be foolish to use it unmodified anyway, unless you like
low-speed I/O (and a JIT isn't a magic bullet).
The reason this was done like this is that the io module is imported at
startup: we want to avoid unnecessary parsing of extraneous code (and
unnecessary importing additional dependencies), and we also want to
reduce opportunities for failing to initialize the standard I/O streams
(especially stderr...).
> This will not solve the io issue, but will add some flexibility.
Which is pointless unless such flexibility is needed by someone. |
|
Date |
User |
Action |
Args |
2010-07-01 16:18:35 | pitrou | set | recipients:
+ pitrou, mark.dickinson, belopolsky, alexandre.vassalotti, benjamin.peterson |
2010-07-01 16:18:34 | pitrou | link | issue9104 messages |
2010-07-01 16:18:33 | pitrou | create | |
|