🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.python
Article #21412

Re: przypisac nieskonczonosc

#21412
From: Krzysztof Stachlewski
Date: Wed, 17 Oct 2007 09:01
33 lines
2385 bytes
Grzegorz Makarewicz napisał(a):
> Seweryn Habdank-Wojewódzki wrote:
> 
>> Ale mnie interesuje, więc co zrobisz? Jak napisałbyś kod rozróżniający te
>> dwa byty?
>>
>> Jak napiszesz taki kod dla mnie podam ci przykładziki kiedy potrzebuję to
>> obsłużyć.
> 
> 
> Już wymyślili - w pythonie jest odpowiednia bateria ;)
> 
> from decimal import *
> 
> # Inf
> inf = Decimal(1) / Decimal(0)
> print inf

 >>> from decimal import *
 >>> inf = Decimal(1) / Decimal(0)
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/lib/python2.5/decimal.py", line 1183, in __div__
     return self._divide(other, context=context)
   File "/usr/lib/python2.5/decimal.py", line 1265, in _divide
     return context._raise_error(DivisionByZero, 'x / 0', sign)
   File "/usr/lib/python2.5/decimal.py", line 2325, in _raise_error
     raise error, explanation
decimal.DivisionByZero: x / 0

Stach
-- 
http://stachlewski.info/foto
Technical Details
Message-ID: <ff4j1a$dss$1@node1.news.atman.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!feed.news.interia.pl!news.nask.pl!news.nask.org.pl!newsfeed.atman.pl!not-for-mail
References: <20071016103416.e69a7bc7.sulsa@dontmail.me> <1192526464.122236.16990@v23g2000prn.googlegroups.com> <ff21gb$l2i$1@news.vectranet.pl> <1192533601.905010.17440@y27g2000pre.googlegroups.com> <ff28jc$rkt$1@news.vectranet.pl> <1192538475.635966.79370@z24g2000prh.googlegroups.com> <ff2cc5$vg0$1@news.vectranet.pl> <1192544706.206962.324280@q3g2000prf.googlegroups.com> <ff2orm$bla$1@news.vectranet.pl> <ff32c8$cng$1@opal.futuro.pl> <ff32qc$l8j$1@news.vectranet.pl> <ff34ds$h5c$5@opal.futuro.pl> <ff3453$luk$2@news.vectranet.pl> <ff35gk$ljj$1@opal.futuro.pl> <ff3796$pf5$1@news.vectranet.pl> <ff4ir9$29c$1@opal.futuro.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!feed.news.interia.pl!news.nask.pl!news.nask.org.pl!newsfeed.atman.pl!not-for-mail
From: Krzysztof Stachlewski <stach@fr.pl>
Newsgroups: pl.comp.lang.python
Subject: Re: przypisac nieskonczonosc
Date: Wed, 17 Oct 2007 11:01:26 +0200
Organization: ATMAN
Lines: 33
Message-ID: <ff4j1a$dss$1@node1.news.atman.pl>
References: <20071016103416.e69a7bc7.sulsa@dontmail.me> <1192526464.122236.16990@v23g2000prn.googlegroups.com> <ff21gb$l2i$1@news.vectranet.pl> <1192533601.905010.17440@y27g2000pre.googlegroups.com> <ff28jc$rkt$1@news.vectranet.pl> <1192538475.635966.79370@z24g2000prh.googlegroups.com> <ff2cc5$vg0$1@news.vectranet.pl> <1192544706.206962.324280@q3g2000prf.googlegroups.com> <ff2orm$bla$1@news.vectranet.pl> <ff32c8$cng$1@opal.futuro.pl> <ff32qc$l8j$1@news.vectranet.pl> <ff34ds$h5c$5@opal.futuro.pl> <ff3453$luk$2@news.vectranet.pl> <ff35gk$ljj$1@opal.futuro.pl> <ff3796$pf5$1@news.vectranet.pl> <ff4ir9$29c$1@opal.futuro.pl>
NNTP-Posting-Host: fw.grono.org
Mime-Version: 1.0
X-Trace: node1.news.atman.pl 1192611690 14236 193.33.58.14 (17 Oct 2007 09:01:30 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Wed, 17 Oct 2007 09:01:30 +0000 (UTC)
User-Agent: Thunderbird 1.5.0.13 (X11/20070824)
In-Reply-To: <ff4ir9$29c$1@opal.futuro.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit