Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comp.lang.python > #5172

Re: [Python-de] automatischer import fallback

From Frank Grellert <grellert@web.de>
Newsgroups de.comp.lang.python
Subject Re: [Python-de] automatischer import fallback
Date 2018-05-28 23:02 +0200
Message-ID <mailman.27.1527541395.2804.python-de@python.org> (permalink)
References <0d867129-e025-508e-c1e3-81415b4039ff@redcor.ch> <CABTCcyYfMNiYZ+i66UWWmtZ9OO9u1W2_WGocRhCWuqP4LWHATg@mail.gmail.com>

Show all headers | View raw


was spricht gegen

try:
   import xyz
except:
  import zyx

Frank

Am 28. Mai 2018 um 22:33 schrieb robert <robert@redcor.ch>:
> Hoi zäme,
>
>
> ist es möglich einen automatischen import fallback zu machen?
>
> Dieser soll einen import der form:
>
>     import XXX.irgend.was
>
> im falle eines import errors automatisch
>
> mit
>
>     import ZZZ.irgend.was
>
> wiederholen, bevor er die Hände  bzw einen Importerror (ver)wirft.
>
>
> danke
>
> gruss
>
> robert
>
> _______________________________________________
> python-de maillist  -  python-de@python.org
> https://mail.python.org/mailman/listinfo/python-de



-- 
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
Frank Grellert
Email: grellert@web.de
Webseite: http://fotoblog.57ps.de/
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*

Back to de.comp.lang.python | Previous | Next | Find similar


Thread

Re: [Python-de] automatischer import fallback Frank Grellert <grellert@web.de> - 2018-05-28 23:02 +0200

csiph-web