« first day (2403 days earlier)      last day (2542 days later) » 
04:00 - 17:0017:00 - 23:00

5:00 PM
There's no error in the image, the math works out when I look at it
 
hello all, I asked a question few days back (<1-2days), and no one has answered it, eager to learn pandas!!! stackoverflow.com/questions/43928540/…
 
What does this mean in python 3.5x

var = input("Please enter something: ")
TypeError: 'module' object is not callable
 
wait... i dont think i understand the what you are talking about.
if i have some binary string long-short-short-longA-longB of size 16 bytes. And i want to get longA it is wrong to seek it at byte 8 and read 4 ?
@sbradbio sorry i dont know panda.
 
Air
@JohanSundman There's something you're not showing us
 
:(
 
5:06 PM
@Air Like what?
line 11, in <module>
s = input("enter")
TypeError: 'module' object is not callable
 
1 hour ago, by Kevin
If you want to determine whether an object is a string, use isinstance.
 
@Danilo No, that's right. You should seek to byte 8.
Signature, Reserved 1, Reserved 2, Planes, and BPP are 2 bytes each, for a total of 10 bytes.
File Size, File Offset, DIB Header size, Image Width, and Image Height are 4 bytes each, for a total of 20 bytes.
Therefore, to get to the end of Bits Per Pixel, and the start of Compression, you should seek 10 plus 20 bytes.
 
Air
@JohanSundman Have you tried reproducing that error in another Python environment?
Like python.org/shell or ideone.com for example
 
@JohanSundman Do you have a file named input.py in your current directory? Did you do import input at any point during the script or interactive session you're running now?
 
@JohanSundman You aren't doing import input are you?
Kevinned
 
5:15 PM
Is it possible that in bython 3.5 input ( raw_input ) is stored in some module ? or you have just renamed the "input" i globals() ?

print out next thing so we can see globals()['input']

@Kevin but i get 6 ( BI_ALPHABITFIELDS RGBA bit field masks ) when i seek 34. I am really confused right now.
 
recbg
 
Air
@sbradbio I looked at your question but it's too much work to try to figure out what you're trying to do. Check out this guide to writing an example that people will actually have the inclination to read.
 
@Danilo Why are you seeking 34? Seek 30.
 
@Air, @AndrasDeak gotcha will mend my question
 
DSM
5:17 PM
"Why are you seeking 34? Seek 30." seems like a wise saying if you take it out of context.
 
@PM2Ring I'm importing my own package 'input.py' yea.. Thanks for pointing it out
 
Air
Good example of the error message meaning exactly what it says.
 
DSM
pandas questions which are clear and small in scope are typically answered within minutes. pandas questions which seem like specifications you'd typically give to a programmer you've hired are typically not answered.
 
should I use cammelcase or _ for spaces in module names?
 
I was under the impression I need to present what I have done so far and what is not working
 
5:18 PM
@sbradbio yes
 
and I guess I printed out the object type for each df which made it look longer
 
Air
@JohanSundman As long as you're not shadowing a built-in function with your module name, use whichever convention is appropriate for your project. But if you really want someone to tell you what to use, read PEP 0008
 
and I hate camel case, so use snake case
 
"Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability." -- PEP 8
 
Air
but whatever you do, don't read PEP 008 or 08
 
5:19 PM
not sure how to concise it as it would not exhibit accurately what I want
 
Air
because conventions are everything
 
@sbradbio MCVE stands for Minimal, Complete, Verifiable Example. It should be as minimal as possible while reproducing your issue.
If removing stuff would misrepresent the problem, don't take away more stuff (hence "Complete")
 
Arbitrary conventions as dictated by PEP 8 make for a good Schelling point which you can totally disregard as soon as you can establish norms for your own project/community/tribe
 
may be write a code inplace of the text that i wrote i guess
 
it should preferably contain everything for a third party to test your problem, which is mostly what "Verifiable" means
 
5:22 PM
A style guide specifically for your project is better than PEP 8; but PEP 8 is better than having no style guide at all
 
and PEP8 is the best starting point
 
@Kevin yep 30... i mess'd up somewhere :D tnx peeps
 
@AndrasDeak that it does :)
 
Air
@Kevin Are you saying I can't write a style guide for my specific project that's worse than PEP 0000000008? Because that is a bet you will lose, my friend.
 
> Variable declarations MUST be cycled between camelCase, snake_case, and StudlyCase
 
5:25 PM
All boolean conditionals should be wrapped in at least three layers of (<expression>) == True for maximum type safety
if (((layers == 3) == True) == True) == True: print "compliant"
 
DSM
(whew) I just finished writing up a workplan for the next six weeks of our intern. I wish I'd known we were getting one earlier.. this was just sort of dropped on me, and somehow everyone involved didn't think about the fact it would take a substantial amount of time to do the setup work and then a fair bit of ongoing work to babysit. :-/
 
> newlines are forbidden unless otherwise would be a SyntaxError
 
DSM
@Kevin: for bonus points, add an is in there.
 
@Kevin You mean [layer for layer in [layer for layer in [layer for layer in (layers,) if layer == 3] if layer == 3] if layer == 3]?
 
Spaces per indentation level should follow the Fibonacci sequence: 1, 2, 3, 5, 8, 13...
 
Air
5:27 PM
Speaking of horrible conventions, WHAT IF I liked PHP so much that I wanted to run a Python project with === replacing is?
 
> if statements should be disfavored over ternary statements
@Air that's not how === works, though
at least not in JS. I assume PHP is the same
 
and the parser will choke on it :(
no new syntax allowed in cpython
 
DSM
You can modify the parser, or preprocess.
 
Air
"I assume PHP is the same" alas, poor Wayne - I knew him, Horatio
 
Did you know him well?
 
Air
5:29 PM
You know how when you assume, you make an "ass" out of "u" and "me"? When you assume something about PHP you make a functional web page that will one day kill a man
 
If PHP has a command-line form that lets you pass programs into it and get output out, you could use subprocess.check_output to use whatever PHP features you want.
 
huh, turns out that "I knew him well" is a memeticized wrong version of the line
 
if subprocess.check_output(["pxp.exe", "-c", "'print 2+2 === 4'"]) == "true":
I don't actually know php but that's the basic idea
 
That would actually work, I think
 
PHPval
 
5:32 PM
well, maybe not precisely that :P
for sure could use tempfiles
 
@AndrasDeak Like how "play it again, Sam" doesn't appear anywhere in Casablanca
 
wat D:
and of course I am your father, but that's common knowledge by now
 
Hah, they're right next to one another on en.wikiquote.org/wiki/List_of_misquotations
 
Air
I think today is a day for a Cannonball Adderley playlist. Starting with dis here
Excuse me while I kiss this guy try to get some work done
 
@Kevin Just, "Play it once, Sam"
 
5:44 PM
Damn it Jim, I'm a doctor, not a verbatim line rememberer.
 
DSM
If she can stand it..
(Advantage of working from home: lamb and cheese lunch. Yum!)
 
> Somebody set up us the bomb
 
I've been saying "set us up the bomb" all this time. I'm so embarrassed.
Well, not that I've used that reference since like '01, but still.
 
DSM
lectio difficilior potior, as they say.
 
@Kevin the audio set us up the misquote bomb, which did say "set us up"
 
5:51 PM
If you think about it, and disregarding English's wonky ideas about what's grammatical, then "set up us" makes more sense than "set us up" if you take "set up" as a single verb that just happens to have a space in it
Kind of like a split infinitive, except there's no "to" here
 
I'm not buying that
guess I can't disregard English's wonky ideas about what's grammatical
 
Compare "I set up the cable in the new apartment" vs "I set the cable up in the new apartment". Or even "I set the cable in the new apartment up"
 
> "Brace yourself, winter is coming"
 
@Kevin or you can consider set as a transitive verb
 
I actually don't think I've seen the first part of that misquote together with the latter.
Only "winter is coming"
 
5:55 PM
@WayneWerner "You shall not pass" (Peter Jackson's fault though)
 
"I set the cable in the new apartment purchased by my cousin because his old place didn't allow pets and he just got a corgi puppy that's hypoallergenic beacuse my cousin is allergic to most dogs up"
 
@WayneWerner misquoted from where
 
there's your fallacy: corgis are not hypoallergenic
 
It's a sphinx corgi. No hair.
(Yes, I know animals emit more allergens than just hair)
 
DSM
Ooooo, strong comeback.
 
5:57 PM
but a hairless corgi can't be a combback
 
Air
@AndrasDeak That's not a misquotation, that's the actual line from the movie
 
yes, it's a misquotation from the book, and it's Peter Jackson's fault
I know it's called adaptation but Peter Jackson's just a filthy liar
 
Air
:P
 
and I might or might not have strong feelings for the original corpus
 
The only strong feeling I had for LOTR was "I've read enough description about the rocky terrain lying between the actual plot points, thank you"
 
Air
5:59 PM
I held a sign at the recent science march that had a screencap of that scene and said "you shall not pass / anti-science legislation" with a list of bill numbers
a group of other marchers yelled "back to the shadow" at me in unison at one point, which was fun
 
DSM
I wish I'd been at one of those to quiz marchers on science. I have a standing policy of refusing to discuss certain topics with people who can't answer the most rudimentary questions, and are clearly deriving their positions the way people choose sports teams, not they way they should arrive at conclusions.
 
What are those things even for? This is the first time I'm hearing about them
 
DSM
The idea is that you take the policies you like, which give people you like more money and power, and call supporting them support of Science.
 
I'm embarrassed to say that I'm pro-science but I still don't know what a null hypothesis is.
 
@Kevin You must have either really enjoyed the several pages of Dwarven songs or just had those pages torn out of your copy.
 
6:05 PM
@DSM sounds... Northern American :D
 
If I'm trying to prove that the widget in the next room is green, what's the null hypothesis? That the widget is yellow? That it doesn't have a color?
 
DSM
@AndrasDeak: (sighs sadly) It's something we do.
 
@Kevin I'm pretty sure that's the hypothesis that's the given? Though I could be wrong.
Like... "the sky is blue" is a null hypothesis? Let's go to wikipedia and find out
Nope,
> In inferential statistics, the term "null hypothesis" is a general statement or default position that there is no relationship between two measured phenomena, or no association among groups.
 
@Kevin just claim that null hypotheses are a part of statistics, and as such are in the realm of stamp collecting
 
Or do you only have a null hypothesis if you're trying to show a correlation between two things? If I was trying to prove "there is a correlation between greenness and widgetness", then the null hypothesis would be "there's no correlation between greenness and widgetness", but I'm not trying to show a correlation, so my paper doesn't need a null hypothesis?
 
6:07 PM
so null hypothesis would be more like, "if I wash my car today, it won't rain"
 
no, null hypothesis (based on your quote) is "if I wash my car today, there will be no effect on the weather whatsoever"
 
DSM
Say rather "if I wash my car today, it won't affe".. aargh, kevinned by Andras
 
Perhaps H0 in this case is "the widget in the next room is not green", which is a pretty good bet if widgets are well-distributed along the visible color spectrum.
 
no, I think your "there's no correlation between greenness and widgetness" is as good as it gets
 
DSM
Being puzzled by the relationship between the hypothesis and the sample space is the first step toward the One True Way, i.e. probability theory, and rejecting the pseudoscience of statistics.
 
6:10 PM
disclaimer: the only thing I know about hypotheses is Wayne's quote from wiki
 
I can't even finish the first sentence of my paper. I'll never learn how to do a science at this rate.
 
go to the dark side, DSM awaits with the embrace of sigma algebras
 
I can come up with a possible explanation for a phenomena, then perform tests to see if the explanation is right, then update my beliefs accordingly, but the Academy will throw it out because I didn't use the word "lemma" in the proper context
And also the entire thing is in Comic Sans.
 
DSM
They're more likely to toss it out because phenomena is plural.
 
or you mispluralized phenomenon ;)
 
DSM
6:14 PM
Ha!
 
bah, counterkevinned by DSM
tight race in the smug scientist category
 
Obviously you should kill two phenomena with one stone by testing them at the same time
 
DSM
That seems to be the first use of "counterkevinned" in the history of the room. This is an impressive day!
 
It's like how "flammable" and "inflammable" mean the same thing.
 
DSM
Pretty sure I've done the "feel free to make a PR but it's going to be hard to get it merged" routine before.
 
6:18 PM
I don't consider myself part of the "science rocks!!!" cultural movement but I do like reading Wikipedia articles about the Voyager probes
 
@Kevin Flammable and inflammable do not mean the same thing. Flammable means you can set it on fire. Inflammable means it is able to burst into flames without an ignition source.
 
DSM
"geologists know science rocks" <- newly minted T-shirt slogan
 
Oh, did I miss the PHP-python conversation, and a chance to bring up what would have been the great Hippy VM?
 
I'm trying to make an ironic joke about "rock science" but I'm failing
OK I give up :P
 
You think Spirit is lonely? At least he has dirt to keep him company.
 
6:21 PM
XKCD mars rover comics make me sad
 
DSM
They're just sleeping until we come visit them again. #patience
 
@toonarmycaptain And that's why they don't let me do science.
 
I got this array:
1112
1912
1892
1234

Why do I get a typeError trying to change one of its values like so:
grid[1][1] = 5 # the name of the array is grid
 
I'm really happy I know that now, but I'm also disappointed that one of my favorite George Carlin bits is ruined.
 
The error explicitly say: 'str' object does not support item assignment
but it doesn't make sense since there isn't a single str in the lst.
 
6:23 PM
@SebastianNielsen M. C. V. E.
 
@SebastianNielsen ^ that
dunno why I still bother
 
I forget it this was an official xkcd or a fan photoshop or a different STEMmy webcomic altogether, but there's a continuation of the Spirit comic that shows Mars three hundred years from now, colonized and terraformed, with Spirit memorialized in the middle of a grassy field with kids playing nearby.
 
DSM
Apr 29 at 22:32, by Andras Deak
@SebastianNielsen Don't expect any meaningful responses until you put together a runnable, short, complete example (you know the drill) that produces your problem so that we can discuss it efficiently.
 
@Kevin I don't think it's canon
 
@SebastianNielsen 100% because grid[1] is a str. print(type(grid[1])) will print str
 
6:24 PM
fml
 
DSM
Aww.
 
@WayneWerner That's it.
 
In case there's someone in the very sparse set of {excited about the Okeanos explorer}∩{not bothering to look at their findings}, this is the most interesting video I've found: actively predatory sea stars
 
Read that as "actively predatory sea of stars" and wondered how the SCP wiki had broken into reality.
 
6:30 PM
those would sound even scarier
 
and I initially mistyped "would" as "wound", the spooky keeps on coming D:
 
2025 - all galaxies in the sky simultaneously begin to blueshift. They have heard us, and they are coming.
 
SCP-3XXX "The Big Crunch"
 
There's already a SCP based on a star that hates us and is traveling towards earth at 0.1c. This is just that times a trillion.
 
6:35 PM
it really doesn't matter if it's a single star flying past us or all of them
 
DSM
The five-bladed razor of dangerous star stories.
The good news is that stars are small and space is big.
 
[citation needed]
 
Stars are small for large values of "small"
 
I think I've worked out how to phrase my question. I want to count the instances of letters in a string, captial and lowercase together, but then append them to a result list seperately. eg P 4 Q 4 p a 7 g g would output P 4 4 p g g because I'm returning nonunique. Any suggestions?
 
DSM
Find your missing Qs?
 
6:39 PM
@DSM huh?
 
DSM
I don't understand how your output comes from your input.
 
Well there are 2 p's (including upper and lower), but only one Q
 
DSM
Do you only count cases where both the lower and uppercase version of a character occur?
 
@Kevin the scariest thing about that is the acausal behaviour
 
en.wikipedia.org/wiki/List_of_largest_stars says "This list is incomplete; you can help by expanding it." Anyone got 1e28 tons of hydrogen handy?
 
6:41 PM
@toonarmycaptain 2 p or not 2 p?
 
No, what I'm trying to do would input P 4 Q 4 K p a 7 K g g and output P 4 4 K p K g g
 
(not sure if that joke works because adding mass to a star might make it smaller thanks to gravity or some such)
 
that is the question, whether it is nobler to quote the bard
or get lost in so many prognostications
 
DSM
Something like
In [29]: cc = Counter(s.casefold())

In [30]: [c for c in s if cc[c.casefold()] > 1]
Out[30]: ['P', '4', '4', 'K', 'p', 'K', 'g', 'g']
?
 
/me looks up casefold
 
6:44 PM
TIL casefold
 
Ok... I get what it does but it's not clear to me that its behavior is any more objectively correct than just doing lower()
 
perhaps it isn't guaranteed to do lower()?
but a consistent shift?
 
:( no help!
 
something weird unicode sounds more likely
> Casefolding is similar to lowercasing but more aggressive because it is intended to remove all case distinctions in a string. For example, the German lowercase letter 'ß' is equivalent to "ss". Since it is already lowercase, lower() would do nothing to 'ß'; casefold() converts it to "ss".
 
Air
@DSM Those crowds are always mixed but my impression of the science march was that the average level of savvy of participants was much higher than the earlier women's march. I saw a lot of people holding signs directly referencing their own graduate theses, specific aspects of policy, etc., recognized a good number of scientists from my own and related agencies, organized labor for state scientists was there, etc.
 
6:48 PM
no wait, I need to put savviness in there
 
Air
Of the marches I've been on, though, it probably had the least clear or actionable message, which is a shame
 
I'll try later, rhubarb for now :D
 
Some of these "simple" puzzles are fiendishly difficult :/
 
A sentiment I heard frequently about that science march was that a lot of the signs were only comprehensible to people that already agreed with them. Nobody's going to be swayed by your pun about sulfuric acid to matter how clever it is.
 
Air
Everyone seemed to be supporting their own particular melange of science-related causes. The running theme was that our policies need to be evidence-based. There are a huge variety of ways to express that.
 
DSM
6:49 PM
Speaking as someone with a doctorate in physics, I know that I should be listened to on matters of public policy on that ground by a factor of about 0.8. Wearing a lab coat means you wear a lab coat, it doesn't mean you know anything about anything else.
 
I am generally pro-physics although I'm not crazy about the inevitability of the increase of entropy in a closed system
 
Air
The sort of science you're likely to do with a doctorate in physics is extraordinarily different from the sort of science you're likely to do with a doctorate in, say, geology
 
Can we repeal that law? Heat death is depressing to me.
 
DSM
I doubt it, unfortunately. Some of suspect it won't be relevant, but that's a subject for a different SE.
 
brb gonna invest all my money in time crystals
 
Air
6:57 PM
I can't say I've ever had anxiety about the heat death of the universe.
 
Due to a fundamental misunderstanding, Kevin goes on to purchase a quartz quarry. His investment skyrockets over night due to the resurgence of the popularity of wristwatches. A series of Mr Magoo-esque blunders leads him to becoming the seventh wealthiest man in the world. Thanks to his fiscal influence, he's at the front of the line when the immortality pill is invented. Five billion years later, as the sun engulfs the earth, he comments "this is pretty much the opposite of what I wanted"
3
 
Air
You're a regular Vonnegut
 
I just checked out Breakfast of Champions from the library yesterday, coincidentally.
I don't know what it's about. If Vonnegut's other books are any indication, I still won't know what it's about after I finish it.
 
Air
I haven't read that one yet.
The last Vonnegut I read was A Man Without a Country, his final collection of essays. It's really good.
 
@Kevin "coincidentally" is an appropriate way to check out a Vonnegut novel IMO.
 
7:14 PM
What does this syntax mean? (python3)
" def lcm(a: int, b: int) -> int: "
At first I thought it was indicating that it only accepted integers, but that doesn't seem to be the cause. It didn't convert neither a or b to an integer.
 
Looks like type annotations. They're more like suggestions than rules.
 
DSM
"python function type syntax" would have been a useful google search.
 
I wasn't sure what it was called tbh
 
DSM
7:20 PM
Why is why I didn't say "search for type hints" or "search for type annotations". Learning how to search for information is a vital skill for beginners.
 
It's often arcane to new eyes, but docs.python.org/3/reference/index.html describes (almost?) every lexical element of the language. Even if you can't read EBNF, you can skim the text explanations. docs.python.org/3/reference/… links to the PEP for type annotations, for example.
If you're sufficiently determined to find the answer, then it lies within.
 
DSM
Even "what does colon int mean in functions in python" has answer #2 and #3 being relevant for me in Google. It's an amazing tool.
 
Hypothesis: people who repeatedly ask easily googlable questions in chatrooms are (un|sub|)consciously feeding an admonishment fetish.
7
 
DSM
That's an.. interesting.. theory, and not one which would have occurred to me.
 
7:36 PM
My theories and views are often described as interesting, yes. The surrounding ellipses are also common.
 
just bought a PLA 3d printer pen. I've had this $20 newegg gift card sitting around for like... 6 months or so, and I finally found something to spend it on.
(...) interesting (...)
"Text found within parenthesis can (not) be ignored"
 
(fnord)
@ZeroPiraeus Filing that under "things not worth thinking about since they're unfalsifiable and uncontrollable" along side "what if we're in a simulation" and "I could get struck by lightning tomorrow"
At least this one, unlike the others, doesn't have much possibility for grievous personal injury.
 
is irritated by the empty tuple, but can't quite work out why
 
Living through a Matrix segfault must feel like licking a million nine volt batteries
 
DSM
@WayneWerner: where's that can (not) pattern from? I want to say an anime title or something.
 
7:41 PM
Evangelion IIRC
Evangelion: 1.0 You Are (Not) Alone. (ヱヴァンゲリヲン新劇場版: 序, Evangerion Shin Gekijōban: Jo, lit. "Evangelion: The New Movie: Prelude") is a 2007 Japanese animated film written and chief directed by Hideaki Anno. It is the first of four films released in the Rebuild of Evangelion tetralogy based on the original anime series Neon Genesis Evangelion. It was produced and co-distributed by Anno's Studio Khara in partnership with Gainax. Hideaki Anno wrote the first movie and is the general director and manager for the entire project. Yoshiyuki Sadamoto provided character designs for the film, while Ikuto...
 
@DSM I actually read it on the internet a few years back. I can (never) forget it when I see parenthetical statements.
 
DSM
I think Kevin's nailed it -- popular enough I'd have seen the phrase, but since I've never watched Eva it's not surprising I couldn't place it.
Mar 16 at 14:17, by DSM
I keep a list of things I read which I find striking, and "please don't make a foam depiction of my avatar" is definitely not what I expected to read this morning.
^ I love reading old transcripts
 
You can always count on Japan to innovate in the realm of weird contortions of the English language.
 
Then again, we probably do the same thing with our sweet tattoos
 
The other day while browsing a collection of tattoos that translate to "idiot foreigner", many comments asked why the subject didn't run the text through Google translate to verify its accuracy. It made me wonder, how would they type the characters in with an American keyboard?
 
shapecatcher.com exists but it didn't recognize my drawing of the first character of 外人
 
DSM
Should I be embarrassed that I just drew on my screen? I argue no, because I'm on my work notebook but my personal notebook has a touchscreen.
 
No, I didn't mean Cyrillic small letter ya: я. Look, clearly there's at least three protruding bits you didn't account for.
 
hey , I wanted to ask a general AL/DS doubt regarding conditions they provide all the time with questions. Can I ask it here?
 
@DSM Nah, that's normal.
@Jean-LucGodard Depends. What does AL/DS mean?
 
7:53 PM
Algorithm and Data Structure
Can I ask ?
 
Yeah provided we stick with language-agnostic concerns
If you get into "I implemented a Bridge in Java and it's not working, who wants to look at it?" territory, that's not a super good fit for here
 
OTOH, if you s/Java/Python, that's a great fit for here :)
@Kevin tangentially: I haaaate when people try to "russianify" a word and use я as a substitute for R.
From Yaussia with love?
 
Related irritation: people assuming that those swirly bits are a common element of Russian architecture and not a design fairly unique to that one building
 
Funnily enough, most buildings in the UK do have a Perpendicular Gothic clock tower on top of them.
 
DSM
It might not make any sense, but it looks cool..
 
7:59 PM
@Kevin Tetyais
 
8:20 PM
gothic architecture is wonderful
 
Air
8:32 PM
I hate when people are irritated by misconceptions related to Russia
 
Misconception-related grievances are the worst.
 
waaat my mathematician puzzle answer is gone
 
I really dislike how much digging you have to do to find an error in c#, but then again this might not be limited to c#......
 
@Air I'm irritated by irritations. Which fuels my irritation, and then I end out in an irritation feedback loop until finally my irritation consumes the galaxy
3
@MooingRawr c# non-python
 
8:38 PM
boooo
 
@WayneWerner dll digging stack traces are oh so much fun... I ended up just outsourcing it to a senior dev that had time to look at it... :\
I'm no good at .dll digging :(
 
Yeah, they're not very friendly
 
I don't get it, the moderators there remove questions just like that
 
meta time!
 
@Antti perhaps it was 0-vote unaccepted?
 
8:44 PM
@AndrasDeak I had +88 answer there
 
perhaps roomba ate it
oooh, weird
 
deleted by Deusovi♦ Jan 7 at 23:05

protected by Emrakul♦ Feb 7 '15 at 20:57

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site (the association bonus does not count).
no meta discussion :D
 
you can start one
 
I cannot see all the comments any more
 
You should...unless mod deleted. Right?
 
8:46 PM
I can see the comments on the answer
but not on the question, that's so stupid
I can see the top comments but not the latest
who invented that
 
weird
sounds like a bug
 
show 9 more comments -> click on that -> "this post is deleted yadayada" :D
 
pfffft that's crazy
 
seems like a post for meta anyway :P
 
yeah, meta
worst case is they tell you a good reason and you're all the wiser
 
8:48 PM
ya later then (if I remember)
 
I've had positive experience challenging mod actions on SO
 
but yea, that bug could be worthy of meta.sex
 
@Antti they are holding mod nominations now, might be the best time to ask about weird mod actions :P
 
@AnttiHaapala: What's with the bread?
 
9:08 PM
there was some kind of conversation about that a while ago
 
if you mean his avatar, those are cinnamon rolls or somethings
 
9:28 PM
@WayneWerner I'll race ya
See who can consume the galaxy first
 
class OutOfGalaxy(StopIteration): ...
 
Is anyone else having problems with Ideone? Whenever I tell it to run my code, it just takes me back to the front page with an empty code box.
 
DSM
^ confirmed.
 
wim
10:20 PM
brain freeze here
is there a list equivalent of dict.get?
i.e. a one-line, EAFP version of this
 
DSM
Not AFAIK.
 
wim
try:
    return L[i]
except IndexError:
    return default
 
No, unless you count awkward constructs like l[i:i+1].
 
DSM
Yeah, I was thinking of (x[i:i+1] or [None])[0].
 
wim
yeah, eww, nah
I just want my_list.get(0, 'default') or something
@DSM that would fail for negative indices I think
because of L[-1:0] returning empty
 
DSM
10:24 PM
You're right, so it'd have to be patched up, but I think it's ugly enough as it is to justify not using, it doesn't need more reasons. :-)
 
wim
I instinctively went to L.pop(i, default)
but the default is only there for dicts
 
Tried collections.ChainMap(l).get(i). Didn't work.
Didn't really want it to.
 
wim
I guess a def is the way to go. Thanks gents
 
04:00 - 17:0017:00 - 23:00

« first day (2403 days earlier)      last day (2542 days later) »