« first day (1616 days earlier)      last day (3348 days later) » 

9:00 PM
Oh yeah! I had gone to the Y path of XY :(
But we can add it as a comment!
 
@JonClements I'd actually be quite fascinated to see an example of that – it flies in the face of how I have always understood the shell to work (it evaluates a command line, performs expansion, works out what to connect to what for redirection purposes etc., and then calls the program with what it has decided should be the arguments). If I'm wrong about that, it'd be useful to know.
 
Phew! Over with that!
 
@Zero umm... apparently it might be unique to Windoze: stackoverflow.com/questions/14042586/…
 
Time's up! Good night all, rhubarb
 
9:05 PM
re-hey-up
 
Ah ... good :-) I'd hate to think I'd been labouring under such a misapprehension of What's Really Going On all these years.
Ugh, I really need to go shopping so I can start to cook.
 
@Zero sounds like a good idea :)
 
But before I do that, I need a shower ... and this heat (35C) is making me too lazy to move between here and the bathroom.
 
@Zero shopping's not looking that likely then :p
 
But a certain person of the female persuasion will be somewhat put out if I don't do all of those things :-/
Maybe I should become an ascetic.
 
DSM
9:16 PM
Time to shut 'er down. Friday rhubarb for all.
 
rbrb!
 
Okay, rbrb for me too. No rest for the morally-obliged-to-prepare-indian-food and all that ...
 
haha yet another unexplained downvote
 
@davidism: you around; know of anything else to respond to this comment and downvote? Did I miss something there?
@AnttiHaapala I had an explained downvote, but I disagree with their reasoning.
 
9:31 PM
the question is a bit unclear and I am hunting the chameleon, so I answered all the possible questions I have in mind, then I got an unexplained downvote, so I guess my answer is not at all helpful
 
Say I catch an Exception (say TypeError) and want to raise a custom exception (FizzyError) with some custom messaging but also provide the original TypeError, how do I do that again?
 
@Ffisegydd use python 3
 
I am using Python 3.
 
then nothing is needed
 
I just don't remember the syntax.
 
9:38 PM
it is there, unless you raise from None
 
stackoverflow.com/questions/24752395/… is what I needed to know I think
 
happened there, sqlalchemy with Python 2 - one cannot have any clue about the actual error; python 3 - immediately obvious
so yes, raise from will make it explicit, while the raise X just looks as "while handling"
lol at "best cryptographic algorithm"
how totally unhelpful that question is and the answers too
question asks about "cryptography algorithm" and the answers talk about "encryption algorithms"
 
@MartijnPieters your answer seems totally reasonable
 
@AnttiHaapala umm.... Caesar cipher, using 26? :)
 
9:49 PM
most of those answers are pretty useless as well
 
0
A: Best Cryptography Algorithm?

KlugeThe best for simple cyptography is an XOR against a key. It's quick, simple to implement and uses the same process for both encrypting and decrypting. Edit: Before my rep gets savaged over this quick response, I should clarify that it's not highly secure. But, it provides good, garden-variety ...

@davidism all of them, even the one voted 24
this is the best answer
your key just needs to be a onetime pad or a blockcipher stream.
and the comments blow it up... "you can use your favourite CD" NO
@KLUGE: Actually this can be very safe if you use something like your favourite CD or DVD as a key. The key is then massive. All you need at the other end is a copy of the same CD or DVD. < Perhaps you could add this suggest and get some rep back. — Ande Oct 7 '08 at 16:23
"I encrypted it with my favourite CD, 74 minutes of silence"
so, the actual content of the answers: "blowfish, aes, xor, they're good because they're symmetric" NOOOO
if we remove that question, ppl will find wikipedia instead :D
 
yeah, it just needs to be deleted outright
 
1 cv more and it can start getting some 20k votes
 
10:18 PM
@davidism thanks for checking :-)
 
Someone needs to read a tutorial - but somehow - doubt they'll take that on board... stackoverflow.com/questions/29176587/…
ironic given the name they've chosen
How it's got three answers grumble grumble
 
isnt the code in question wrong actually
str float has done the same as repr float for ages
ah sorry Python 2.6
 
11:10 PM
0
A: Floating Point Numbers

Antti HaapalaFirst of all, the repr behaviour described in the question does not apply to Python versions since Python 2.7. Secondly, the talk about full precision vs user-friendly is misleading since we are talking about the relative error of ~2-53; vs 2-54. Indeed, in Pythons 2.7 and 3.1 it was decided tha...

@DSM tried to teach 'correct horse battery staple' to my bosses, and they're like "yeah but that password does not make sense, how about "monday is a beautiful day"
...
 
Okay - that's just untrue :)
 
11:41 PM
ahem, I'm using python 2.7 and the configparser
I'd like to know if there's a way to make it return a value with a type different from string
if myvar: 3.0, I'd like config.get('section', 'myvar') to return a type float
any suggestion?
I know I can cast it after, but I'd prefer not to
 
@Agostino strangely, if you look at docs.python.org/2/library/…
and the few lines after that.....
 
omg, how did I miss that
I even searched for get_int
naming ftw
does that still exist in python3?
I'd like a way to import it so that it works
and they renamed the class again in 3.2
removing raw
 
Apart from getboolean(), config parsers also provide equivalent getint() and getfloat() methods, but these are far less useful since conversion using int() and float() is sufficient for these types.
all that's happened is change the module name... you are reading the docs right? :p
 
heh, summarily, apparently not enough
supposed a config reader would be easy
any suggestion on how to import it in a way that's good for 2 and 3?
try: import ConfigParser as confp
 
try:
    from configparser import ConfigParser
except ImportError:
    from ConfigParser import ConfigParser
Like that
bah, my indentation's gone wonky again... bloody editor...
 
11:51 PM
so, the first is for 3
 
thanks
this is nice actually
an automatic cast may be nice to have, but I guess it's dangerous
I get an unresolved reference error
if I try to invert that
@JonClements I would use this, what do you think
try:
import ConfigParser # ver. < 3.0
except ImportError:
import configparser.ConfigParser
 
Well they're doing different things
One you're importing a module, the other you're trying to (incorrectly) import the class
 
oh
try:
import ConfigParser.ConfigParser # ver. < 3.0
except ImportError:
import configparser.ConfigParser
is this "better"?
 
Do you need access to the module?
 
11:57 PM
I have no idea
 
import ConfigParser as configparser for < 0 instead if so
 
right now I'm importing ConfigParser and the doing config = ConfigParser.ConfigParser()
 
@Agostino then if you're not sure - you're probably better off just going with what I suggested to start with :)
 
the point is right now I have similar imports, but with an attempt to import the v2 first
I don't know if that's good or bad practice
just wanted to make it consistent
 
Put the most likely version it's going to run on first
 

« first day (1616 days earlier)      last day (3348 days later) »