#apache #archlinux #asterisk #centos #debian #gentoo #haskell #kde #kubuntu #lisp #math #mysql #perl #python #ruby-lang #rubyonrails #suse #ubuntu #vim #wikipedia 0 1 2 3 4 5 6 7 8 9 10
Top Prev 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 Next
#python
<pjd> same for using izip instead of zip
<Juhaz> astan, 'rw' is not a valid mode
<b52lap> hi
<astan> Juhaz: whoops.
<nachos> dont i need a [] around that pjd?
<nachos> that is around the lookup.gets().. for c in text'
<b52lap> do you know website like http://aspn.activestate.com who offer python sources codes ... ?
<pjd> no, it has a () instead
<nachos> pjd: ok
<astan> Juhaz: thanks a lot!
<pjd> that makes it a generator instead of list
<nachos> pjd: and the generator is iterable?
<nachos> and i suppose more efficent
<Juhaz> yep
<pjd> it's like a normal generator, yeah; just compact syntax
<pjd> nachos: another approach is to base the mapping on ord()/chr()
<pjd> don't know if you're interested
<nachos> yeah i am
<nachos> fire away
<ikor> pjd : with symbolic link all works fine.
<pjd> odd
<meshugga> hey guys
<pablo_> hi, can i compile a python app to binary code?
<evilx_> yes, but why?
<nachos> pablo_: you want py2exe
<pablo_> nachos: mmm not for win
<nachos> mmm nachos
<toma^> huh, is that possible nowdays?
<meshugga> how can i make a string of any object, like dicts, tuples, ...?
<Jafet> str()?
<meshugga> any object?
<meshugga> i think i tried that, but i'll try again
<AzMoo> Hey, does a derived class call the constructor of its parent when instantiated?
<toma^> AzMoo: afaik, no
<toma^> AzMoo: I had to do it manually too
<zyp> AzMoo, do it manually
<pablo_> can i hide a python program implementation?
<pjd> nachos: i've annotated the paste
<AzMoo> Alright, nice one, thanks.
<pjd> AzMoo: if you don't override it, the parent gets called
<pjd> meshugga: str() or repr()
<pjd> you might also be looking for serialization
<pablo_> acn i distribute only the .pyc of my app as in .class of java?
<pjd> pablo_: yes
<nachos> interesting read: http://linuxgazette.net/100/pramode.html
<nachos> very interesting pjd, thanks.
<pjd> nachos: that approach is longer, but a bit more generic
<pythonboy> hi , i have a question, i don't understand the behavior , i need an NxN matrix (list, array, whatever) ...
<meshugga> pjd, Jafet thanks
<pjd> you could add (ord('0'), ord('9')) to the ranges to rotate numbers as well, for example
Previous Page Next Page