Deutsch English Français Italiano |
<vitda2$1ite$1@cabale.usenet-fr.net> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!3.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!.POSTED!not-for-mail From: Olivier Miakinen <om+news@miakinen.net> Newsgroups: fr.comp.lang.python Subject: Re: Signature d'une fonction Date: Fri, 6 Dec 2024 00:34:26 +0100 Organization: There's no cabale Lines: 28 Message-ID: <vitda2$1ite$1@cabale.usenet-fr.net> References: <vikoqt$3eo5p$1@dont-email.me> <vimqp4$1h59$1@cabale.usenet-fr.net> <vin3d6$1mos$1@cabale.usenet-fr.net> <6750134f$0$12939$426a74cc@news.free.fr> <vipdmh$6ri$1@cabale.usenet-fr.net> <67504685$0$11432$426a34cc@news.free.fr> <viss7a$1crn$1@cabale.usenet-fr.net> <vist0t$1d6j$1@cabale.usenet-fr.net> <test-20241205225548@ram.dialup.fu-berlin.de> NNTP-Posting-Host: 200.89.28.93.rev.sfr.net Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit X-Trace: cabale.usenet-fr.net 1733441666 52142 93.28.89.200 (5 Dec 2024 23:34:26 GMT) X-Complaints-To: abuse@usenet-fr.net NNTP-Posting-Date: Thu, 5 Dec 2024 23:34:26 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4 In-Reply-To: <test-20241205225548@ram.dialup.fu-berlin.de> Bytes: 2366 Le 05/12/2024 22:59, Stefan Ram m'a r�pondu : > > Ouais, c'est ouf ! > > L'id�e derri�re tout �a, c'est que Python veut rester une > langue sans typage statique de base. On peut voir les types > comme des commentaires, .... ce qui est d�j� une excellente id�e. > ou utiliser des outils suppl�mentaires > pour v�rifier les types. > > Un exemple, c'est � mypy �. [...] > > mypy: test.py:9: error: Incompatible return value type (got "str", expected "int") [return-value] > test.py:11: error: Argument 1 to "test" has incompatible type "int"; expected "str" [arg-type] > test.py:11: error: Argument 2 to "test" has incompatible type "str"; expected "int" [arg-type] > test.py:13: error: Argument 1 to "test" has incompatible type "int"; expected "str" [arg-type] > test.py:13: error: Argument 2 to "test" has incompatible type "str"; expected "int" [arg-type] > test.py:15: error: Argument 2 to "test" has incompatible type "str"; expected "int" [arg-type] > Found 6 errors in 1 file (checked 1 source file) Ah oui, tr�s bien ! -- Olivier Miakinen