[Scons-dev] Python 3 issue
Russel Winder
russel at winder.org.uk
Mon Jun 26 04:31:16 EDT 2017
On Fri, 2017-06-23 at 10:53 -0700, Bill Deegan wrote:
> This change:
> https://bitbucket.org/bdbaddog/scons-russel-example/commits/48899a710
> f9afbec891307addd6ae5b9c08d53c9?at=master
>
> Will make it work in py2 and py3.
>
> Any reason we can't live with that?
On reflection that probably seems like what I should have written in
the first place!
Python 3 uses absolute imports with the . and .. exceptions. The
absolute_import __future__ makes Python 2 behave the same to give
consistency. Of course this only works if the parent package is
imported. In this context that will always be the case, so it should be
fine.
I can definitely live with this as an idiom.
I am now just embarrassed to have found this problem. :-)
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at winder.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20170626/26f713aa/attachment.pgp>
More information about the Scons-dev
mailing list