On Feb 10, 2013, at 06:14 PM, Jakub Wilk wrote:

>* Matthias Klose <d...@debian.org>, 2013-02-10, 17:54:
>>Fixes should be easy and made in a way that works with both the old PIL 
>>>modules and the new Pillow egg/package:
>>
>>  import Image
>>
>>should become
>>
>>  try:
>>    from PIL import Image
>>  except ImportError:
>>    import Image
>
>Why is the "import Image" fallback necessary? "from PIL import Image" works
>with the old PIL, too.

I don't think the fallback should be necessary, unless you did it like this
(which I don't recommend):

try:
    import Image
except ImportError
    from PIL import Image

IOW, the first import would fail if you don't have the -compat package
installed.

Cheers,
-Barry


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130211105523.14bdf...@anarchist.wooz.org

Reply via email to