[spambayes-dev] RE: [Spambayes-checkins] spambayes/spambayes Corpus.py, 1.21, 1.22 FileCorpus.py, 1.18, 1.19

Tony Meyer tameyer at ihug.co.nz
Fri Mar 18 04:08:43 CET 2005


>>> future imports have to come first...
>> I thought that too, but if I run this script (with 2.2), it works:
> 
> Sure, but not with CVS HEAD:

Ah - too cutting edge for me :)

>     % python
>     Python 2.5a0 (#75, Mar 15 2005, 21:55:51) 
>     [GCC 3.3 20030304 (Apple Computer, Inc. build 1671)] on darwin
>     Type "help", "copyright", "credits" or "license" for more 
> information.
>     >>> import example
>     Traceback (most recent call last):
>       File "<stdin>", line 1, in ?
>     SyntaxError: from __future__ imports must occur at the 
> beginning of the file (example.py, line 3)
> 
> Think of it as __future__-proofing... ;-)

:)  So I guess this was a case of the implementation not matching the
documentation and it just took 3 minor versions to get fixed.  I'm sure
there's irony in there somewhere, but I can't quite spot it :)

=Tony.Meyer



More information about the spambayes-dev mailing list