zlacker

[parent] [thread] 1 comments
1. mdanie+(OP)[view] [source] 2025-08-04 14:48:01
I don't believe that "from __future__" is the future-proofing you think it is, they just named it that way to be cute - a hypothetical 3.19 version couldn't even use it, since it's just a normal python import

  $ python3.13 -c 'from __future__ import awesome_feature'
    File "<string>", line 1
  SyntaxError: future feature awesome_feature is not defined
the very idea of "future feature is not defined" is insaneo

Anyway, I'd guess what they intend is

  try:
    from __future__ import fever_dream
  except SyntaxError:
    fever_dream = None
because python really gets off on conditional imports
replies(1): >>simonw+n1
2. simonw+n1[view] [source] 2025-08-04 14:54:09
>>mdanie+(OP)
I was responding to the "Python does none of that" by pointing out that Python does indeed have features to help introduce new capabilities in a thoughtful way - I know it's not the same thing as something like conditional imports.
[go to top]