#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 11 12 
Top Prev 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 Next

#python

<Ind[y]> We have to accept that PHP uses a better documentation system.
<Ind[y]> php.net/foo is better than docs.python.org/ref/foo.html
<Tubez> Ind[y]: at least with python you dont have the inane comments at the bottom :P
<Tubez> Sometimes i spent hours on a wild goose chase because the comments were wrong.
<Ind[y]> Tubez: :PP
<esperegu> anyone knows of a module to enable automatic code updates of a program?
<josip> Tubez, it's foolish to trust those comments :)
<josip> they should be separated from the official documentation
<Tubez> josip: yeah but when you're stuch you'll take all the help you can get
<Tubez> josip: and yes, they should be separate. Just a link away would be good.
<josip> yeah, that makes sense
<josip> or maybe to be expanded with some ajax goodness
<Tubez> With a disclaimer :P "CAUTION! These comments were written by users. As such, they are by and large utterly clueless"
<josip> Tubez, there's no need of it, probably everyone knows it
<josip> they'll just waste several bytes
<Tubez> This is PHP we're talking about...
<josip> I won't be going to back to PHP (maybe for money sometimes) until they get namespaces and fix all the functions
<josip> get some conventions about argument passing and naming
<josip> was it substr or strsub
<josip> first needle then haystack or the reverse ?
<josip> ooh, it depends on the function
<josip> and damn I have a headache
<Ind[y]> josip: :(
<Tubez> josip: heh, that sounds familiar. PHP has it's place, mind you, but the lack of cnventions is just too anooying.
<Tubez> not that python doesnt have it's warts occasionally.
<AndroidData> I'm getting TypeErrors with my contents list. "TypeError: `NoneType` object does not support item assignment".
<whaley> Tubez: at least they aren't genital warts :)
<cracki_> AndroidData, your list is None
<Leeds> AndroidData: don't try to assign an element to None
<AndroidData> http://pastebin.ca/370237
<AndroidData> what am I doing wrong in generating my list?
<josip> why contents = [] is in the class definition ?
<cracki_> .append(None) is wrong
<Leeds> just do .append([])
<cracki_> or read the tutorial
<cracki_> looks like you're missing some of the subtler points
<whaley> AndroidData: use self.contents=[]... and the init method is a better place for that assignment
<Leeds> and you don't need to do range(0,16)
<Leeds> but yeah, generally, read the docs more carefully
<Ind[y]> Notepad++ is cool. Now, it works also like a Hex Editor :)
<AndroidData> ok I figured it out. thanks.
<AndroidData> is there a way to split up a png file w/ python?
<AndroidData> so I can make tiles.png which contains 32x32 blocks of all the tiles in the game, and I can split them up so I don't have to make 200 files for each tile?
<T`> if you have a dict.. can you make variables out of it.. key=val?
<Leeds> T`: if you really need to, and have a good reason, yes... but why?
<AndroidData> ya, I'd guess so. my previous language had this in the form of a "dict" named "vars"
<AndroidData> vars["name"] would be the same as src.name
<T`> Leeds, well i have this code which is expecting key=val type args beceause i used the function blah(self, arg1, arg2, arg3)
<AndroidData> it's purpose would be to do runtime checking of which variables were given to which object
<T`> now i dchanged it to blah(self, **data)

Previous Page  Next Page

Search ircarchive.info