Re: [Python-Dev] python3k : imp.find_module raises SyntaxError

2010-12-01 Thread Ron Adam
On 12/01/2010 04:39 AM, Nick Coghlan wrote: On Wed, Dec 1, 2010 at 8:22 PM, Greg Ewing wrote: Nick Coghlan wrote: For the directory-as-module-not-package idea ... you would need to be very careful with it, since all the files would be sharing a common globals() namespace. One of the thing

Re: [Python-Dev] python3k : imp.find_module raises SyntaxError

2010-12-01 Thread Nick Coghlan
On Wed, Dec 1, 2010 at 8:22 PM, Greg Ewing wrote: > Nick Coghlan wrote: > >> For the directory-as-module-not-package idea ... >> you would need to be very careful with it, >> since all the files would be sharing a common globals() namespace. > > One of the things I like about Python's module syste

Re: [Python-Dev] python3k : imp.find_module raises SyntaxError

2010-12-01 Thread Greg Ewing
Nick Coghlan wrote: For the directory-as-module-not-package idea ... > you would need to be very careful with it, since all the files would be sharing a common globals() namespace. One of the things I like about Python's module system is that once I know which module a name was imported from

Re: [Python-Dev] python3k : imp.find_module raises SyntaxError

2010-11-30 Thread Nick Coghlan
On Wed, Dec 1, 2010 at 3:59 PM, Ron Adam wrote: > Yes, it's realising that it is a *lot* more *complicated*, that gets me. > Flawed isn't the right word, it's rather a feeling things could have been > simpler if perhaps some things were done differently. *That* feeling I can understand. The impor

Re: [Python-Dev] python3k : imp.find_module raises SyntaxError

2010-11-30 Thread Ron Adam
On 11/30/2010 07:19 PM, Nick Coghlan wrote: On Wed, Dec 1, 2010 at 8:48 AM, Ron Adam wrote: * It almost seems like the concept of a sub-module (in a package) is flawed. I'm not sure I can explain what causes me to feel that way at the moment though. It isn't flawed, it is just a *lot* mor

Re: [Python-Dev] python3k : imp.find_module raises SyntaxError

2010-11-30 Thread Nick Coghlan
On Wed, Dec 1, 2010 at 8:48 AM, Ron Adam wrote: > * It almost seems like the concept of a sub-module (in a package) is flawed. >  I'm not sure I can explain what causes me to feel that way at the moment > though. It isn't flawed, it is just a *lot* more complicated than most people realise (cf. P

Re: [Python-Dev] python3k : imp.find_module raises SyntaxError

2010-11-30 Thread Ron Adam
On 11/30/2010 01:41 PM, Brett Cannon wrote: On Mon, Nov 29, 2010 at 12:21, Ron Adam wrote: On 11/29/2010 01:22 PM, Brett Cannon wrote: On Mon, Nov 29, 2010 at 03:53, Sylvain Thénault wrote: On 25 novembre 11:22, Ron Adam wrote: On 11/25/2010 08:30 AM, Emile Anclin wrote: hello,

Re: [Python-Dev] python3k : imp.find_module raises SyntaxError

2010-11-30 Thread Brett Cannon
On Tue, Nov 30, 2010 at 00:34, Sylvain Thénault wrote: > On 29 novembre 14:21, Ron Adam wrote: >> On 11/29/2010 01:22 PM, Brett Cannon wrote: >> >Considering these semantics changed between Python 2 and 3 w/o a >> >discernable benefit (I would consider it a negative as finding a >> >module should

Re: [Python-Dev] python3k : imp.find_module raises SyntaxError

2010-11-30 Thread Brett Cannon
On Mon, Nov 29, 2010 at 12:21, Ron Adam wrote: > > > On 11/29/2010 01:22 PM, Brett Cannon wrote: >> >> On Mon, Nov 29, 2010 at 03:53, Sylvain Thénault >>  wrote: >>> >>> On 25 novembre 11:22, Ron Adam wrote: On 11/25/2010 08:30 AM, Emile Anclin wrote: > > hello, > > work

Re: [Python-Dev] python3k : imp.find_module raises SyntaxError

2010-11-30 Thread Emile Anclin
On Monday 29 November 2010 20:22:22 Brett Cannon wrote: > > Considering these semantics changed between Python 2 and 3 w/o a > discernable benefit (I would consider it a negative as finding a > module should not be impacted by syntactic correctness; the full act > of importing should be the only t

Re: [Python-Dev] python3k : imp.find_module raises SyntaxError

2010-11-30 Thread Sylvain Thénault
On 29 novembre 14:21, Ron Adam wrote: > On 11/29/2010 01:22 PM, Brett Cannon wrote: > >Considering these semantics changed between Python 2 and 3 w/o a > >discernable benefit (I would consider it a negative as finding a > >module should not be impacted by syntactic correctness; the full act > >of i

Re: [Python-Dev] python3k : imp.find_module raises SyntaxError

2010-11-29 Thread Ron Adam
On 11/29/2010 01:22 PM, Brett Cannon wrote: On Mon, Nov 29, 2010 at 03:53, Sylvain Thénault wrote: On 25 novembre 11:22, Ron Adam wrote: On 11/25/2010 08:30 AM, Emile Anclin wrote: hello, working on Pylint, we have a lot of voluntary corrupted files to test Pylint behavior; for instance

Re: [Python-Dev] python3k : imp.find_module raises SyntaxError

2010-11-29 Thread Brett Cannon
On Mon, Nov 29, 2010 at 03:53, Sylvain Thénault wrote: > On 25 novembre 11:22, Ron Adam wrote: >> On 11/25/2010 08:30 AM, Emile Anclin wrote: >> > >> >hello, >> > >> >working on Pylint, we have a lot of voluntary corrupted files to test >> >Pylint behavior; for instance >> > >> >$ cat /home/emile/

Re: [Python-Dev] python3k : imp.find_module raises SyntaxError

2010-11-29 Thread Sylvain Thénault
On 25 novembre 11:22, Ron Adam wrote: > On 11/25/2010 08:30 AM, Emile Anclin wrote: > > > >hello, > > > >working on Pylint, we have a lot of voluntary corrupted files to test > >Pylint behavior; for instance > > > >$ cat /home/emile/var/pylint/test/input/func_unknown_encoding.py > ># -*- coding: IB

Re: [Python-Dev] python3k : imp.find_module raises SyntaxError

2010-11-25 Thread Ron Adam
On 11/25/2010 08:30 AM, Emile Anclin wrote: hello, working on Pylint, we have a lot of voluntary corrupted files to test Pylint behavior; for instance $ cat /home/emile/var/pylint/test/input/func_unknown_encoding.py # -*- coding: IBO-8859-1 -*- """ check correct unknown encoding declaration

[Python-Dev] python3k : imp.find_module raises SyntaxError

2010-11-25 Thread Emile Anclin
hello, working on Pylint, we have a lot of voluntary corrupted files to test Pylint behavior; for instance $ cat /home/emile/var/pylint/test/input/func_unknown_encoding.py # -*- coding: IBO-8859-1 -*- """ check correct unknown encoding declaration """ __revision__ = '' and we try to f