IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1822.29 MB
Powered by
Channel Info
Network: freenodeChannel: #python |
Search in www.irclog.org
Log from #python at freenode 2006-05-20
[15:56]<mnax9qq>+Is adding 'object' to a classes base classes an 'acceptable' way to force your class to be a 'new style' class, even if its subclassing an 'old style' class ?
[15:59]<gfvsvjgg>+grr. this is driving me nuts.. anyone with PyYAML installed who can confirm what print yaml.dump({'foo': 'bar'}) returns?
[16:04]<c2zjjcs>+Mech422: should be.
[16:04]<mnax9qq>+kbrooks: thanks - I was a lil worried about what I'd inherit with 'object' ...
[16:21]<sfd006>+Why does 38.9+39.9 = 78.799999999999997 under python?
[16:21]<fyjuw>+quick python question: suppose I have a statement " a = some_method(blabla)" . If some_method raises an exception, does it modifies the contents of a? I mean does the attribution even occurs?
[16:22]<ref>+sly007: floating point crap.
[16:22]<sfd006>+gzl, is this a bug?
[16:23]<sfd006>+gzl, how can I get the right result?
[16:23]<cxzysljrr_rpc>+lioux: no, a will be unchanged
[16:23]<fyjuw>+thanks :)
[16:23]<fyjuw>+I'm trying to hack aruond the latest bittorrent 4.9.* series which is like not omega release level
[16:23]<ref>+sly007: it's sort of a bug. it's a bug in computers.
[16:24]<cxzysljrr_rpc>+sly007: that is the right result... 78.8==78.799999999999997
[16:24]<fyjuw>+and I don't know python hehe, I'm getting alon on my OO and scripting "knowhow"
[16:24]<ref>+ChrisLong_afk: what?
[16:25]<ref>+oh, nm.
[16:27]<sfd006>+ChrisLong_afk, no, 78.8=78.79999999999999...
[16:27]<sfd006>+No 7 at the end
[16:28]<sfd006>+So that's the wrong result
[16:28]<gfvsvjgg>+ACTION always thought that 78.8 is 78.8, but what do i know.
[16:28]<cxzysljrr>+sly007: >>> 78.8==78.799999999999997 #=> True
[16:29]<c2zjjcs>+elvstone: fractions are inexact
[16:29]<gfvsvjgg>+kbrooks: alrighty.
[16:30]<svgrfvxvrfjg>+is there a funciton to get the size of various type, such as int, double
[16:30]<cxzysljrr>+sly007: the problem is, not all numbers can be represented exactly as floats
[16:30]<sfd006>+ChrisLong, why is there a seven at the end? Mathematically speaking, 78.8=78.79999... with an infinite number of 9. Is the 7 a way to represent the fact that the series is infinite ?
[16:30]<svgrfvxvrfjg>+in C language, i can get the int size by sizeof(int)
[16:31]<2fzacmzjym_wm>+sly007: ieee-754
[16:31]<sfd006>+Why does python chooses 7 to denotate the infiniteness of the number
[16:31]<cxzysljrr>+sly007: no, 78.799999999999997 is the best floatingpoint approximation to 78.8.
[16:32]<svyzznz_>+it may be that its represented as .799999999999997999999999999.. etc
[16:33]<sfd006>+Oh ok. But not that if you change the seven by a number #0, Python still says True
[16:33]<cxzysljrr>+sly007: have a look here: http://docs.python.org/tut/node16.html
[16:34]<cxzysljrr>+sly007: that explains the problem
[16:52]<c2zjjcs>+http://kbrooks.ath.cx/index.php/2006/05/20/orwell-01-alpha-1-released/
[16:53]<xvzdlyznx>+kbrooks: Any screenshots?
[16:53]<c2zjjcs>+XVampireX: oh, thanks. i forgot that :P
[16:54]<xvzdlyznx>+okey
[16:54]<lsygj>+*wants screenies too*
[16:54]<c2zjjcs>+XVampireX: theyre uploaded though. ill make a new post.
[16:55]<xvzdlyznx>+:P
[16:55]<c2zjjcs>+brb washroom
[17:03]<c2zjjcs>+http://kbrooks.ath.cx/index.php/2006/05/20/orwell-screenshots/
[17:06]<xvzdlyznx>+nice :D
[17:06]<svyzznz_>+what is orwell?
[17:06]<svyzznz_>+oh duh, rtfl
[17:08]<xvzdlyznx>+kbrooks: RTFM is not "Read the fine manual" it's "Read the fucking manual"
[17:11]<c2zjjcs>+the channel is #orwell
[17:12]<wynnpnpysx>+#wordpress
[17:12]<wynnpnpysx>+oops
[17:17]<cxzysljrr>+ACTION has to... Eurovision Song Contest party /nick ChrisLong|afk
[17:21]<ludv>+What's a convenient way to do xpath in Python? It's not built in, is it?
[17:22]<slrdsax>+Luyt: lxml IMHO
[17:25]<ludv>+Ah, thanks for the tip, I'll investigate that further.
[17:29]<meyre>+anyone here know how to do level 27 of pythonchallenge? it's the one with the static and the 'zigzag' and the 'tables'
[17:29]<meyre>+noone's answering in #pythonchallenge
[17:30]<fjffrc>+Luyt: usually from xml import xpath does the trick for me =)
[17:41]<ludv>+Hmmm, xpath might not be in my default install, which is 2.4.2 on Windows: import xml; ('dom' in dir(xml), 'xpath' in dir(xml)) => (True, False)
[17:41]<xvzdlyznx>+pythonchallenge sounds like an awesome thing.
[17:43]<zzfzmzgmnz>+for people with lots of time on their hands :-)
[17:45]<xvzdlyznx>+I can't solve the first one :P
[17:45]<c2zjjcs>+Luyt: maybe in 2.5 it is
[17:46]<xvzdlyznx>+Ah, nevermind, I was stupid :P
[18:00]<nfvnz>+How can I get yesterday's date=
[18:00]<nfvnz>+?
[18:01]<zzfzmzgmnz>+elver datetime.date.today() - datetime.timedelta(days=1)
[18:01]<nfvnz>+Zalamander, thanks.
[18:16]<-- dvxn|syzzzyus xzs>http://www.bagdadsoftware.de")
[18:31]<ludv>+Is there some object in which supports read() and write(), but reads and write from a string, instead of a file?
[18:32]<juxre>+StringIO
[18:32]<cjjffdrg>+Luyt: yes : StringIO
[18:33]<ludv>+Thnx
[18:38]<nfvnz>+Any good libs out there to produce good-looking graphs on the fly?
[18:41]<ludv>+I always use... http://www.graphviz.org There exist python binding too, I think
[18:43]<ludv>+Elver: http://yapgvb.sourceforge.net/
[18:44]<nfvnz>+Looking for something to do bargraphs with, mostly.
[18:44]<ludv>+Aha, business graphics
[18:45]<nfvnz>+It's for our bookstore website, so I guess it's business, yeah, heh :)
[18:45]<nfvnz>+I thought it'd be cool to have a bargraph showing the number of books published in the past week.
[18:47]<ludv>+Elver: http://matplotlib.sourceforge.net/screenshots.html
[18:48]<ludv>+By the way, if you only want simple barcharts, there is not even need to generate bitmaps etc... you can get away with tables with colored cells and the 'width=' attribute ;-)
[18:49]<nfvnz>+:D
[18:51]<nuz2s>+cool? it's only cool if it improves sales. make it clickable, have it show which books are new when moving over the bars, ... :)
[18:54]<ludv>+Is there a standard (or obvious) way in Python to implement a 'webspider' like program; one that retrieves a webpage and all the webpages it refers to?
[18:55]<ajsyl>+Luyt, creating a spam database ? j/k
[18:55]<zzfzmzgmnz>+Luyt the pycurl package has a pretty good reputation for that sort of thing.
[19:07]<ludv>+Thanks. No, I'm not creating a spam database. I'm investigating how difficult it is to build a thematic search site, for example, for real estate.
[19:12]<mugsvw>+hi
[19:12]<mugsvw>+i'm reading the dive into python bok
[19:12]<mugsvw>+*book
[19:12]<ludv>+It looks like the standard urllib will also serve me well
[19:13]<ludv>+Is it a nice book? I have O'Reilly's "Learning Python" here...
[19:13]<mugsvw>+I'm having a problem with the fileinfo program... did anyone read it?
[19:13]<mugsvw>+yes it's nice
[19:13]<zzfzmzgmnz>+dunstx I haven't read it, but I have it here. What page are you looking at?
[19:13]<mugsvw>+59, in the pdf version







