« first day (1860 days earlier)      last day (3081 days later) » 
00:00 - 14:0014:00 - 00:00

12:00 AM
I've used python for a long time and Pandas is still foreign to me because it's not a standard library
 
That's somewhat comforting
only not because I have to use it :P
 
12:46 AM
I can't tell if it's "clever" or "stupid" to use references in place of overt values as much as possible. On one hand, it seems like part of the purpose of there being references in the first place (like when an attribute points to a dictionary key, instead of the value that key holds), but on the other, I can picture a lot of very unpopular and very dead programmers floating down the Harlem River for overusing it.
Maybe that "as much as possible" is the thing that separates the two? :I
Hm.
 
1:29 AM
@Augusta Generally, you save and use a reference whenever you want to avoid repeating yourself. If you ever want to change it, it will either happen automatically or be easy to change in a single location.
As far as pointing to a key instead of its value, you do that when you specifically want whatever value is attached to that particular key at that point in time. If you're interested in reusing the value, you would instead save a reference to that value.
 
I was thinking more of places or times when it may not seem as clear, like specific palette rgb values (while the others around it are fixed). Situations where a dynamic variable might come as a surprise.
Places where it's convenient to have a value change with a specific reference from elsewhere, but at times when you might need a moment (or several) to realize that this is what's actually happening.
 
If you use it exactly once, e.g. def func(a): return a*2, it's probably best not to change that to def func(a): multiplier = 2; return a*multiplier.
But if you use this palette RGB value multiple times, you had better save a reference or you'll have to mess with all those magic numbers any time you want to change them.
 
Yeah, that makes sense. I suppose it's a better application for it than I thought.
 
290
Q: What is a magic number, and why is it bad?

Adam DavisWhat is a magic number? Why should it be avoided? Are there cases where it's appropriate?

Note that the accepted answer there doesn't even approve of magic numbers that are only used once, in a function. I think that's a little extreme.
 
Cool, thanks :D
 
1:43 AM
hello everyone!
 
If I have a function that calculates a hexagon's perimeter given the length of one side, you can bet that I won't have sides = 6 in there.
Hi Hank.
 
I have a stupid question - when you instantiate a new Class/Object multiple times, they are scoped individually right?
so if i have
obj1 = Obj('test')
obj2 = Obj('test')

these two objects should be identical?
same class instantiated with the same init parameters
 
I'm running python -m filename.py and getting an error "No module named filename.py" even though I don't import anything by that name... Any idea what's up?
 
turns out in my case, obj1's content != obj2's content
well to be specific, obj1 and obj2 reference two separate objects, but obj2's content is twice the obj1's content
 
1:58 AM
Fixed it. Removed the .py at the end
 
what does -m do?
 
10
A: Execution of Python code with -m option or not

Martijn PietersWhen you use the -m command-line flag, Python will import a module or package for you, then run it as a script. When you don't use the -m flag, the file you named is run as just a script. The distinction is important when you try to run a package. There is a big difference between: python foo/b...

 
sweet thanks
 
@HankLiu What do you mean the object's "content" is "twice" that of the other object?
 
2:58 AM
I'm using orderData = csv.reader(open(orders_file), delimiter=",") which gives me [["header 1", "header2"], ["value 1", "value 2"], ["value 3", "value 4"]]
How can I remove the header object, ["header 1", "header 2"]?
 
Easy brute-force answer: orderData.pop(0).
 
I tried that and del but it errors our saying '_csv.reader' object has no attribute 'pop'
(or del if I do that instead)
 
Does anyone think they can help me with a problem I'm having with exec()?
 
@michaelpri I don't support uses of exec() :P
exec(...)
    exec(object[, globals[, locals]])

    Read and execute code from an object, which can be a string or a code  object.
    The globals and locals are dictionaries, defaulting to the current
    globals and locals.  If only globals is given, locals defaults to it.
 
3:16 AM
Is the only reason why exec is a problem because you can potentially tell it to murder everything and it'll do it without thinking twice?
Or are there other pitfalls, too?
 
@AaronHall I kinda have a good reason for using it...
 
debugging is harder, as I understand it.
 
@AaronHall That makes sense.
 
ok, what's the use-case?
 
3:21 AM
Well, I'm building a program to allow people to code by voice. When I convert the voice command to code, I execute it by using exec(code). You can check out what I'm saying here: github.com/michaelpri10/VoiceCoding/blob/master/listen.py#L27
 
DSM
Brief cabbage for all.
 
And what's your problem?
I don't think there's any cabbage eaters up right now. I just had chik-fil-a, though.
 
Well, first, I was had the function to execute the code in a function in another file that I imported, but when I tried to print a variable that I had defined, I would get an error saying that the variable was not in the global namespace (or something like that). It works fine when I execute the code in the main part of my program without using a function.
 
@AaronHall I'm at the pizzahut. I'm at the tacobell. I'm at the (pizzahut | tacobell).
 
It's not a huge problem, but I wasn't sure why the variables wouldn't be defined.
 
3:28 AM
@Augusta that's way super cool. There's one of those in Manhattan... my secret pleasure drools
 
XD
 
@michaelpri ok, globals are global by module. there is no true "global", actually.
the zen of Python (import this) says "Namespaces are a honking great idea" but I'm pretty sure that came after the design decision, not before...
 
I have this vague memory that, in their way, modules themselves are global-globals in that, if you load a module which you've already loaded, from a module you're loading now, the module you're loading will update all instances of itself everywhere it appears.
Or it'll skip it entirely. One of the two. In either case, Python has an awareness of which modules are active in a global sense, even if it doesn't like to share them around between modules.
BUT!
I've been known to be wrong.
 
This might be one of those cases
 
DSM
It's true that imported modules behave as singletons. People use that to pass global state around.
 
3:32 AM
Ah, I guess that makes sense
 
so, sys.modules is where the modules are stored by name
when a module is imported the first time, it's executed
 
So if you have __main__ calling import MamaLuigi, Spaghetti_v2, and MamaLuigi also calls import Spaghetti_v2, it'll be, like, "Oh hey, yeah, Spaghetti_v2 is already here. I'll put you in touch!" And both modules will share it.
 
all other imports of the same module just put the module/name in the namespace
 
@AaronHall Yeah
If you want to be clinical about it. ¬_¬
 
I have to be precise, else I could be fabulous, but also fabulously wrong
 
3:35 AM
I, on the other hand, am merely a functional alcoholic~ <3
Remain fabulously.
 
eveing :)
 
Cabbage.
 
Python does "unpack" collections for arguments right?
foo(a, b, c): ...; list = (1, 2, 3); foo(list) works right?
 
DSM
No, you'd need foo(*list).
 
oh thanks I knew something needed to be done :P
 
DSM
3:37 AM
But rebinding the name list to a tuple is perverse on many levels..
 
Does foo(*list, anothervar) also work though?
(I had "l", just the font here doesn't suit that name ;P)
 
@DSM The Abyss is still staring back into me, but at least it compiles faster now.
 
DSM
@paul23: these days, yes.
 
@DSM ?
 
DSM
@paul23: the syntax around argument unpacking has changed over the years in different Python versions. It used to be you couldn't do that; now you can.
 
3:40 AM
Hmm can it also be done in 2.7?
 
DSM
@Augusta: given that I like mixing of references I really wish I knew what you were talking about.
@paul23: no, foo(*tup, anothervar) won't work in 2.7. You could do foo(*tup, **kwargs), or foo(*tup, somevar=someval).
 
@DSM Thanks :)
 
@DSM I was having a conversation about Zarathustra a couple of days ago, and for some [or no] reason, the idea of man as an entity on rope over an abyss between list and tuple amused me.
 
Now to see if I need it
 
The result is what you read.
 
3:42 AM
:P
Are you guys going to shoot me for using CamelCase both for classnames as well as methods/functions? Pycharm is constantly raising "pep 8 errors". Almost giving me the believe it's a religion for python.
 
DSM
> Between the mutation / and the rebinding
Between the sort method / and the AttributeError
Falls the Shadow
 
Oh and "expect 2 blank lines, found 0", "Too many blank lines between functions"
 
@DSM Nice~
 
4:06 AM
@paul23 get with the program - PEP 8 is the standard. Unless you work with a bunch of people who arbitrarily overrule it.
 
@AaronHall It's followed that much?
 
Same as essaywriting.
"Here are some rules. They make as much sense as anything. Everyone does it, so you should, too, that you may be more easily understood.
But if you're a Special Snowflake, go ahead and make your code into ASCII art."
 
If you don't follow it, your code will probably be uglier, and more confusing for most people to read.
 
Any place that's worth anything will have a Python style guide. And there it is, already written. So they'll reuse it. Python has batteries included.
Along with an instruction manual and lots of other documentation...
 
It depends on who's looking at your code. It's one of those things where you would do well to obey the spirit of the format, but anyone who would harangue you over, say, the number of characters' width you set for soft returns is being neurotic. Usually.
 
4:11 AM
@AaronHall but_underscore_incr_fun_len_by_so_much_for_compl_funcs
 
for _ in [__ for __ in ___]: get_rekt(*_)
 
DSM
> Recall that intercaps [camelCase] became popular in programming languages that did not allow underscores within names, such as Pascal and Smalltalk. In using intercaps, one seems to be reverting to the early Middle Ages, when handwritten words were not separated, and thus flouting an important readability tool that is a thousand years old.
 
Don't write stupid function names like that then, and you won't have stupid problems to complain about.
 
@DSM Or one just comes from Germany
 
so I'm iterating through dates in a date range using for single_date in daterange. How can I compare a string with single_date? I tried if date == single_date.strftime("%Y-%m-%d"): but that's throwing an error saying the truth value of a Series is ambiguous
where date is a string in that format
 
4:14 AM
sounds like singe_date isn't a single date
 
how would it not be when I'm iterating though?
 
I don't know, why don't you put a print statement and find out what it is?
 
DSM
More likely that date isn't a string.
 
good point :P
 
Anyone who could give me a better way to fit these functions I'd be grateful: TrueAnomalyFromEccentricAnomaly EccentricAnomalyFromMeanAnomaly TrueAnomalyFromMeanAnomaly EccentricAnomalyFromTrueAnomaly MeanAnomalyFromEccentricAnomaly MeanAnomalyFromTrueAnomaly
 
4:17 AM
@paul23 classes. Have different Anomaly subclasses that implement from_eccentric, etc, or something to that effect
 
@davidism An anomaly is just a number lol (anomaly is a formal name for "angle")
 
And?
 
That was it. Thanks for telling me to print :)
 
You can subclass int.
Networkx handles converting between different graph types by allowing passing an existing graph to a different class constructor. So Graph(DiGraph(...)) produces an undirected graph from a directed graph.
 
@davidism Would it work with math then? without overloading/adding a to_float() function?
 
4:19 AM
Yes.
Time to see if RealMyst: Masterpiece Edition works with wine.
 
ah a google shows me I have to overload __float__, now to fix all my cod
 
Subclass float
 
PEP8 is for Python what SVO is for English.
You like this could write, and others, understanding you, would, maybe.
It, though-- why would you do?
Being this way, such frustration is made!
No! Do not!!
Dat art, tho..
Some people just have *round frumple* for *spicy parties,* I guess.
:/
 
DSM
Utah 93 Toronto 89. Dissatisfied rhubarb for all.
 
What did Utah have that Toronto didn't? Other than four points.
Rhubarb.
 
4:41 AM
How can I check if a row exists in a pandas dataframe? rowNum in dataframe doesn't work
 
5:04 AM
nvm, I worked around it
 
 
3 hours later…
8:04 AM
Hey up all
 
8:16 AM
I heard there was cabbage.
 
There is always cabbage... and cabbage is always
 
If always was cabbage but cabbage wasn't always, I would say their __eq__ was messed up.
 
8:32 AM
I was wondering if you guys have any objections to using the sopython.com wiki to draft a refactoring of the regex tag wiki?
 
@tripleee nope - feel free
 
excellent, thanks!
 
8:48 AM
@tripleee going to edit regex tag info? That's nice. What u r going to add?
most of the questions asked on regex are duplicates. Please Create a list of canonical ques so that I could swing my hammer.
 
Hi! o/
 
@IanClark hi - new image? :p
 
@Jon - last one was 5 years old :P - went from looking 12 to 15 :D
How be?
@vaultah good luck in elections :D
 
I be the same as always... SSDD and all that :) How b u ?
 
SSDD? :P
Yeh good thanks :) - apparently I have 10 days to take off over xmas which will be lovely as I've only had 4 this year yawn
 
9:00 AM
So - plenty of time to chat then :p
 
@JonClements did you have any rights of showing mod tools to others?
 
huh?
 
like picturing the mod tools page and posting it here.
:-)
 
@JonClements (@AnttiHaapala) I ended up doing this (see linked message). Thanks a lot! (Had to go then since this is for a personal project, so doesn't get much lovely time :))
 
I created sopython.com/wiki/regex_tag_wiki_refactoring -- not sure if it's visible to anybody except myself?
@AvinashRaj Can you see the draft I just posted?
 
9:11 AM
>>> x.to_json = lambda x:"dafs"
>>> json.dumps(x,default=x.to_json)
'"dafs"'
>>> json.dumps([x],default=x.to_json)
'["dafs"]'
>>>
this is pretty good for my limited usecase
 
@tripleee "In particular, many older tools (Awk, sed, grep, lex, etc) as well as some newer ones (JavaScript, many text editors) support different dialects, which do not necessarily support e.g. non-capturing parentheses (?:...)"
but js and grep -P should support non capturing group.
 
feel free to clarify ... the point I'm trying to make is "do not necessarily"
 
append this to the third point.
Correct way of matching those are (Jun|Jul|Aug)
and also it's better to include the canonical regex answer.
 
erm, I don't seem to be able to make further edits to the page I created! (-:
@AvinashRaj what do you mean by "include the canonical regex answer"? I put in a placeholder for (some of?) the links from the current page
 
9:21 AM
yeah, it's among the lines I definitely assume we want to include in the link collection which I only provisionally hinted at for now
@JonClements would you be able to approve me for editing? or where should I go?
 
@triplee try to edit it now
I've switched the wiki page to Community mode, so anyone logged in with >100 rep should be able to edit it.
 
@Ffisegydd yay, thanks!
 
Feel free to ping me if you run into any other issues.
 
@IanClark the election will soon be over for me, but thanks 😊
 
:)
 
9:36 AM
Well this certainly bothers me.
 
Cabbage!
 
That's the sort of mess that makes me question the point of even trying to answer questions on SO.
 
@TigerhawkT3 is it because of the up vote or because it is a duplicate ?
or because of my answer :P
 
looking around in the wiki, sopython.com/wiki/LPTHW_Complaints should probably explain what LPTHW is (though I can guess)
 
I made a good answer, it was completely ignored, he asked another question that would've been covered if he hadn't ignored my answer, then someone else gets rep for something I already told him. So now I feel like I wasted my time, the site is messier (the new topic is not new ground anyway; I would've closed it as a dup regardless), and I don't know why I'm even here.
All the reasons that SO surveys suggest - helping people, getting rep, etc. - I'm not getting any of those benefits.
 
9:42 AM
plus SO members not discouraging reposting the same question since they are answering them
 
None of the joys of helping people or getting noticed, all the joys of seeing someone else benefit.
Yes, that too.
 
@tripleee Huh? So you only pay an interest to the wiki that people have spent time writing when you want to use it for your own purposes hey? :p
 
If that question was the asker's first, I would've closed it as a dup anyway, because it's certainly been asked before.
I'm never gonna make it to 20k.
 
I did not know he asked the same question twice
 
@JonClements serious? I was delighted to find useful content and am proposing improvements
 
9:44 AM
@tripleee didn't the ":p" at the end given enough context? :p
 
I visited sopython.com a few times before but did not notice the wiki -- maybe it should have better visibility?
 
Knowing that would require a little of investigation :P
 
Short of being the first item in the menu you mean?
 
not sure if :p is smiling or not
 
He asked question A, and I gave him a complete answer of how to do A and B, and then he asked how to do B.
 
9:44 AM
@VigneshKalai might be a good time to start looking into all OP's history before answering them
 
@TigerhawkT3 give it time, you certainly have my upvote already
@JonClements touché, but all I'm saying is it might be good to have a few of the highlights as explicit links on the welcome page
 
I am somehow having less fun right now than I was a couple days ago when my friend's neighbor's stoned wife tried to make out with me while her husband chatted with my friend right in front of us.
 
I think I discovered what LPTHW means, 'learn python the hard way'
 
@tripleee Kind of agree, so I added a note at the top.
 
@Jerry yes, I figured that out, too, but unexplained acronyms are a bad smell
 
9:47 AM
@tripleee yup - it certainly couldn't hurt to use that main page a little better... maybe raise something on github.com/sopython/sopython-site - then we can ignore it for 6 months like everything else listed :p
 
@poke brilliant, thanks!
 
yea, at first I thought it was something about homework lol. Didn't read the contents of the page at all
 
@Jerry the option of doing that in the given time frame is less :(
Then I should be spending my time in investigation then answering questions :P
 
I already get rep very slowly, what with my hammer.
 
so you are willing to encourage double posting? ok
 
9:48 AM
also, I'm hoping somebody will get tired of my (ahem) constructive criticism and simply give me editing access (-:
 
I am not encouraging it :(
 
you are if you think that it takes too much time to do that
and answer instead
 
it is a valid concern -- SO makes it much too hard to find and identify duplicates
but this is the sort of question where you should stop and think "isn't it probable that somebody has asked (more or less) this before?"
 
@tripleee I welcome any criticism, and I think it was a very valid point, so thank you :)
 
Just saying that I come like a lightning and go like one :( don't get the time to investigate . Looks like it is time to start investigating then answering .
 
9:50 AM
I generally Google for site:stackoverflow.com python keyword string. I've gotten pretty fast at it, because oftentimes an easy dup will have a few answers in less than a minute.
 
@TigerhawkT3 +1!
 
@VigneshKalai such practice is exactly what encourages people to continue posting new questions instead of looking for the already existing solution!
 
@VigneshKalai at your rep level it's really hard to do anything about duplicates so I kind of sympathize ... but the proper response in an ideal world would be to ignore questions which are easy to answer (I know, it's not exactly appealing)
 
"why would I search for a question that is like mine if I can post a new one and get an answer almost instantly!?"
 
@TigerhawkT3 stoned wife !. It sounds like a magical love story .
 
9:53 AM
I'm pretty okay with spending a large majority of my time here on curation (hammering dups, flagging, etc.), but if the SNR of answering useful questions for rep to cleaning up garbage is zero, I'll have to reevaluate how I spend my time.
 
I just try to help people . I just answer easily answerable question when I see there can be a easier, more efficient and logical answer.
And I have stopped answering questions like old times
 
@VigneshKalai Yeah, Oregon is an interesting place. I also got told to "move to America" when asking a gun shop clerk if they sold guns to Californians.
 
sort of related to the discussion meta.stackoverflow.com/a/252077/1578604
 
That's what I'm saying - I'm trying to help people, but my answer just disappears and not even the asker reads it, and then they ask a question that makes their lack of research effort abundantly clear.
And if nobody reads it, am I helping anyone?
 
tangentially, is this irony? stackoverflow.com/teams/137/team-america
 
9:57 AM
In doubt, you always help yourself. Writing a good answer requires you to think about things in a way that makes you learn it even better.
If I think about it, it’s just massive what I learned from answering and solving other’s problems.
 
@TigerhawkT3 that's what help vampires do, it's not SO itself so much as a small group of annoying users
 
I do occasionally answer questions that are difficult for me but I know I'll get nothing.
 
I wish there was a way to warn others but it's not exactly compatible with the general spirit of SO
 
Largely, though, it's not much of a challenge for me to say "use a dictionary, and for God's sake do something about that string."
 
@TigerhawkT3 you get to increase your own knowledge and skill if nothing else
(at least that's why I like the questions that make me go "umm.... hadn't thought about that" or "I'm not sure of the answer, but it might be... let's do some research and see")
 
10:00 AM
Yes, like I said, I occasionally do answer questions like that - but not always, and not even frequently.
 
now that I examine this user's profile I find that I was annoyed by the same OP yesterday, though not to the point where I would have actually downvoted
 
It's hard enough finding questions that aren't obvious duplicates, and don't use libraries I'm not familiar with.
So I just try my best to answer things that I feel I could make some pretty code for, on questions that aren't dups.
 
@poke that's one way of saying it :P and I would say it is 50-50 thing . 50 to help others and 50 to help myself :)
 
But I find one, and... it's ignored.
 
@TigerhawkT3 If it makes you feel any better, I still have those same problems, and I have been here… for a while.
 
10:03 AM
So instead of helping someone and getting rep, I see someone else getting rep to make the site messier. Instead of a good, complete answer to a question, it's a duplicate answer to a duplicate question.
I don't know how you deal with it.
 
actively participating in the close vote queue has reduced my stress levels
but it might not work for you
 
I'm okay with having to sift through a lot of junk to find the (relative) gems I'm comfortable with answering, but I'm hitting that ZeroDivisionError.
I don't have any error checking for useful == 0.
 
Perhaps you can add it to a queue if the same user asks another question in a short time. Then a MOD or high rep user can review it .
 
Probably a good idea... I've asked a whopping four questions in over two years, and only two of them were more than mediocre.
 
From the meta post it looks like i am "repwhore"
 
10:12 AM
To be honest, repwhoring is kind of necessary to some degree if you want to unlock rep privileges in a reasonable time frame.
 
Yes to get rep we sometime answer bad question , nowadays it is hard to find a unique question.
Rhubarb all :)
 
Rhubarb.
 
10:37 AM
pandas why you eat so much RAM? ;___;
Yay for swap space \o/
 
Hi
 
7GB and counting ;_;
 
@Ffisegydd Bamboo must get boring occasionally I guess?
 
I think it's actually a combination of ipython and pandas that is eviscerating my machine from the inside.
 
10:42 AM
That's why I limit myself to "python" :D
 
hey @thefourtheye! any good news from Chennai?
 
I wouldn't mind it using 8GB of RAM, but the file is only 1.6GB :(
 
I want to learn Machine Learning and pandas. I am quite familiar with python.
 
@AwalGarg I am still alive :D
Thanks for asking :) Situation is slowly becoming normal
 
@thefourtheye haha, I don't really get to follow news much :P I hope the food supplies strengthened somehow?
 
10:47 AM
Yup, but few of my colleagues had to move to different places. They will return to their houses soon, I guess
 
@thefourtheye it has started to rain again in Tambaram .
 
@VigneshKalai Here as well, but its pleasant now.
 
I don't think chennai can take more of this rain
It has been raining for hours here .
 
Send it to California!
 
@TigerhawkT3 be by guest and take it :) we have already given some of it to Andhra :P
 
10:53 AM
@TigerhawkT3 Trust me, you will not like it if it is raining this much :D
 
@thefourtheye ah well. Glad to hear stuff is improving though :) Take care!
 
@thefourtheye ji are you from shollinganallur side ?
 
@VigneshKalai Yup, I am in Sholinganallur only
 
Heard it was drenched there. All those photos my god it would have been very bad there.
 
@TigerhawkT3 This would have been a better target though
 
Cbg all
 
Cabbage!
 
cbg snape
& cbg autobot
 
cbg Sword and Poke
 
11:28 AM
That question should be closed as a dup of the "ternary operator?" question. The solution is a ternary operator.
 
@JRichardSnape cbg all already covered it , right?
 
@Ffisegydd I have found iPython w/ pandas a memory hungry combination too.
 
cbg betleH.
The Decepticons have been troublesome today.
 
@Sword Sure, but redundant design catches bugs.
:)
 
or maybe SO trained you to be specific always :)
 
11:30 AM
Or maybe it doesn't.
 
Either way, poke, if you'd like to reopen the question and reclose it with a different dup, that's fine by me.
 
I can’t do both :P
So I’m not doing anything ^^
 
You can't vote to reopen and then vote to close? That's odd.
 
If in doubt, do nothing. A sage piece of thinking.
 
Nope, only one “close” vote per question, and a close vote covers both close and reopen
 
11:34 AM
But I can close and then reopen. Is it just the other way around that doesn't work?
 
really? You can reopen it?
 
Honestly, if I didn't think it would cause a rabble, I would close that "if/else in a comprehension" question as a dup.
Yeah, that's how you can unclose a question that you closed too hastily.
But I won't reopen it, because it is already a good dup.
 
Yeah, it’s okay
 
Kind of like how we don't need a question for how to concatenate strings while working in the terminal, how to concatenate strings while working with Tkinter, how to concatenate strings while working with pyqt, how to concatenate strings for a Tic-Tac-Toe game...
TL;DR: I don't care if the ternary operator is being used in a comprehension, in a box, or with a fox, it's still a ternary operator.
Jeez, talking with this guy is like watching someone trying to weasel their way out of a speeding ticket.
 
11:55 AM
@TigerhawkT3 You should stop now.
 
I will.
 
12:05 PM
@MartijnPieters I feel your answer is wrong ?
 
@poke but there could be someone wrong on the Internet!!! :p
 
This ['This', ' ', 'is', ' ', 'a', ' ', 'text', '; ', 'this', ' ', 'is', ' ', 'another', ' ', 'text', '.,.'] is the wanted output right
 
@Jon Since you’re here, care to clean-up this question? It doesn’t feel right to flag someone for it.
 
Sorry saw the last edit .You did it there :)
 
@poke yeah done - OPs probably thinking - what the hell are those 3 guys going on about!?
 
12:07 PM
I'm sure there's some long German word for when you dupehammer a question that's already gotten a FGITW answer, but the FGITW user is the same one who answered the canonical question years ago.
 
Thanks :)
 
And now he's complaining that it's not quite a duplicate, too.
 
@TigerhawkT3 It’s called Vergesslichkeit.
 
I see what you did there.
It's like seeing Obama littering.
Maybe I should just ease up on the hammering, and there's no such thing as a true duplicate.
I remember a recent starred SOP chat message along the lines of "the only way to do something before Martijn Pieters is to do it before he was born." I guess that even applies to Pieters himself. :P
Maybe I should go through his old answers and re-ask the questions that prompted them. I'll get rep, he'll get rep, happy feelings for everyone.
Riot Games, Inc. uses terms like "agency" and "counterplay." Agency basically means that you feel that your actions made a difference. Counterplay means that you feel there's something effective you can do in response to various events.
I don't feel either of those here.
 
Another way of solving that question
def transform(value):
    if isinstance(value, basestring):
        return value.lower()
    else:
        return value
names = ["a","Abc","EFG",45,65]
print [transform(n) for n in names]
It is not a duplicate :P [Just kidding]
 
12:22 PM
And I'm not even getting banana stickers.
 
@TigerhawkT3 Do something nice ,and don't expect anything in return
Anyways I would give you a sticker of you choice :)
 
Not even a result?
 
I think I'm too calm.
Maybe if I weren't as calm I wouldn't be ignored, dismissed, or laid off as much.
 
Only on the C# tag: User asks simple question, two high-rep users (including myself) answer it quickly. Both get 3 upvotes. I also close to vote with a duplicate. And suddenly that other high-rep user who answered as well, who also happens to have a gold badge, hammers it.
Best part of the question:
> Thumps up if question is good
Can’t wait for the day I can stop rep-farming C# questions and just ban-hammer all the things.
 
12:29 PM
@VigneshKalai Heck - if you really wanted to you could go for [getattr(n, 'lower', lambda: n)() for n in names] :p
 
@poke and then people will disagree with your dupe-hammer and vote to reopen.
Lol I'm just kidding. That's only me.
 
C# people don’t care much about that stuff
they don’t seem to care about anything mostly xD
And they still give upvotes, even if the question is closed… good for me.
 
@JonClements now I am working my brain to understand what you just did there :P
 
heh, my highest-voted answer on SO is on a question closed for ages (stackoverflow.com/a/10368236/298479 - #4 when googling for php file extension)
 
Sorry about being a negative Ned. I haven't been doing too well lately.
For the past few years.
 
12:33 PM
@Thief Heh :D
 
@JonClements that was awesome nice use of getattr function did not know that trick :)
 
I actually don’t mind answering a question that can be closed as a duplicate. Often, this gives the ability to explain things in a different or more specific way.
 
I used to answer questions before they could be hammered :P
 
My top-question is actually a question that I self-answered and got closed a while later.
And I still get rep from it.
 
It is the other way around for me my most down voted question is a duplicate question :P and my top voted answer is a duplicate :P
 
12:40 PM
My top-rated answer got immediate criticism for being brute force even though it's one of the fastest solutions, then it got a bunch of copycat answers, and it's buried under a pile of other answers (including a "let's time all these solutions" answer) and doesn't get me ongoing rep.
One of my other top-rated answers would probably just be "*" if not for the minimum character requirement.
 
My top got me a gold populist badge which was cool :)
 
Then there's my "-0 and 0 are the same thing" answer.
 
And at both time it was ` Ashwini Chaudhary` who marked it as duplicate. Coincidence !!!.
 
@Jon Do you know by chance if upvotes after the rep-cap still count towards the “score” on tags?
 
What is more pythonic? list comprehensions or map/filter functions?
 
12:53 PM
Depends. Usually list comprehensions though
 
Cool, thanks.
 
@poke They do - yes
 
yay :)
 
Actually, I personally have used map/filter till now, but these days I am focusing on learning the language conventions. Got to know just a while ago that I should be putting 2 newlines before function definitions :/
 
I think GvR prefers comprehensions.
 
12:58 PM
oh, this guy created python. cool. TIL
 
@VigneshKalai In what way exactly? The trailing ''?
I've explained that in my answer.
 
cbg
 
1:58 PM
I always forget about switch statements
 
00:00 - 14:0014:00 - 00:00

« first day (1860 days earlier)      last day (3081 days later) »