« first day (1984 days earlier)      last day (3184 days later) » 

13:00
@XuMuK: BTW, input is a bad choice of variable name, since it shadows the built-in input() function, which can lead to mysterious bugs. It won't actually hurt anything in your code, but it is a bit confusing to anyone reading your code.
@XuMuk try printing type(list_lines) and type(list_lines[0]) to verify that you have what you expect to have (i.e. a list and a string)
out = [e for e in list_input for i in list_lines if e.startswith(i)] is working, but print out is crashing
OMG, some of our requirements files contain -e . as a requirement. Aaarrrggghhh!!!
@XuMuK What version of Python are you using?
Given the similarity of the two "different" fonts this room uses for text and code, I wonder if we could modify the CSS to put a light grey background behind all code? By "we," of course, I refer to someone who knows what they are doing
13:07
@PM2Ring ActivePython 2.7.6.9
user559633
@holdenweb We'd also need access to edit the css :/
print list_lines[0]
print list_input[1]
S1000005_S2000005_S3000005
S1000005_S2000005_S3000005 6.20000000e+001 2.60000000e+001 2.80000000e+001
@XuMuK All I can suggest at this stage is to try running the script outside IDLE.
@PM2Ring it means my Python version has some bugs, will try to download another
Python is very good at handling geospatial data, right? I've heard that's one of its strong points comparative to other languages, with scipy and numpy
13:14
I've seen a lot of matplotlib basemap stuff
I don't know if that applies
but I find it plausible anyway:P
@corvid it is also very good with ready solutions for a lot of tasks
@corvid There's geopy which seems to be popular, although I've never used it.
I was thinking of switching a Node back end out for a flask one, because most queries are geospatial
user559633
Is there some calculation you can't perform in Node? It really depends what you need.
@PM2Ring there is quantum-chemistry under python, but it is very slow pyquante.sourceforge.net
user559633
13:16
If you're using postgres, there's geo types in there, but mostly I think it will come down to libraries if you don't want to type the math functions yourself
I think it's more about storing geographical locations and related metadata. A good example is Yelp's map, where it queries in a specific geospatial range for something
@XuMuK wow, interesting
user559633
@corvid so your needs are an array or tuple or floats?
If you need to do complicated geospatial calculations you may find the Python bindings for GeographicLib useful.
@tristan Basically. Just breaking down Boston into districts, which are easy queries, but queries where there is some variables are harder to optimize
user559633
13:21
@corvid I'm trying to figure out why this would enter a language-specific-benefits domain
not really language specific, so much as easier to write in different languages
user559633
To be safe: I'm not trying to be difficult -- I really would like to know what you're running into
just that knex with node is a little bit tedious to deal with
user559633
The query builder library?
user559633
Can you post an example of what you're doing?
13:26
@holdenweb Yeah, it's possible. The actual CSS rule is quite simple: code {background: lightgray;}. The more difficult part is injecting it into the page. I have written a greasemonkey script that does this but it uses the proprietary GM_addStyle function which probably doesn't exist in user-scripting engines for other browsers.
It seems very likely to me that every browser that has addons, has an addon that can modify css on a per-page basis. In which case you can download that and paste my rule in.
For example, firefox has Stylish. I haven't tried it myself but I assume it does the needful.
If you're thinking "ok but is it possible to make the light gray background visible to absolutely everyone that views this page?", you'd have to make a feature request on Meta and/or bribe the lead chat dev.
Does this deserve a proper answer, or should it be closed as a typo? I guess it's possible that someone else could encounter the same problem... stackoverflow.com/questions/36152151/…
I actually find it unclear...
The OP didn't explicitly confirm that the problem was line endings, but if that's the actual problem, I'd say it's worth an answer.
@Kevin True, but he did say that the problem was caused by settings in his editor, so I guess that's close enough. :)
I do think the problem is line endings though. It's the best explanation for how they could get # OHt open(file_name).read() as output.
DSM
DSM
13:40
Morning cabbage.
and is it likely to help future readers?
@DSM morning
@AndrasDeak Perhaps, if they've inadvertently created a data file with CR line endings and don't understand why it over-prints when they dump it.
I can imagine this question being asked by someone else in the future. It's not common, but it isn't unique.
If OP had worded the question better, this could have been one of those trendy "why am I getting this puzzling output from seemingly ordinary code?" questions that gets ten upvotes and hangs around on the hot network questions sidebar all day.
As-is, the actual curious behavior (one line partially overwriting a previous one) is buried three paragraphs in, and only affects three characters of the output.
cabbage
@PM2Ring but is it likely that those users will find this post?
13:46
Trick question. Users don't look for questions that answer their question.
:D
maybe XY askers do
Better question: "but is it likely that when this gets asked again, we Python regulars will think 'haven't we seen this before...?' and be able to successfully dupe hammer?"
0
Q: How to reset OS:X installation of Python packages installed using sudo?

enderlandImagine that one did not realize how virtual environments work in Python and installed a lot of packages using sudo pip install for OS:X. Now they are facing problems managing package versions. This would never happen if one understands virtual environments, but if one did this prior to being en...

this makes me feel like a complete idiot
In the distant future, Regular X comes into the room and says "seeking a dupe target for [Help All My Output Is On One Line Python]" and PM will say "Oh yeah, I answered a question like that back in '16, here's a link"
@Kevin I do that on Workplace... it's kind of depressing how many questions I just have in my brain somewhere
13:50
@enderland Isn't that a just asked question on Stack Overflow?
@BhargavRao it's my question :P
I figure folks here might actually appreciate that instead of "plz code me this homework problem" like most of the questions... :)
@enderland Exactly! From the room rules ... sopython.com/chatroom
> Do not link your recent (< 1-2 days) questions in the room. The main site is the dedicated space for posting questions, and having them answered.
is that a programming question?
@AndrasDeak there are plenty of questions about pip on the main site as well as virtual environemnts
that's irrelevant:)
13:52
The intent of the "no posting new questions" policy is that it's not very effective as a signal boost, because everyone interested in answering questions already has a tab open to watch for new posts.
@HEADLESS_0NE cbg
It's similar to the "you don't need to ask 'can I ask a question'?" rule. Doing it doesn't make you a bad person, it's just not going to help you achieve your goals.
you might have more luck on superuser.SE, no?
Yeah, True that.
13:53
sigh, whatever
Can I ask you a question about asking a question?
I'm not offended by your post or anything
I'm genuinely concerned for its reception
@enderland: What they said. However, pip freeze will list everything that pip knows about
SO is about programming and development tools. I assume pip qualifies as a dev tool, though perhaps it's not and I'm even further missing the point of pip and virtual environments
@HEADLESS_0NE Perhaps we need to add a recursive rule, Don't ask to ask to ask a question; Just ask
:D
13:55
@BhargavRao Perhaps the question is the answer.
well the title was misleading, "How to reset OS:X installation of Python packages installed using sudo?" sounds something right out of SU:)
@HEADLESS_0NE Now you are trying to make me headless. :D
I deleted the question, whatever
So much tension in here this morning
are you going to ask on SU?
13:55
@BhargavRao Or re-write it as: "Do not attempt to target individuals with your question as it makes you look like a help vampire or stalker".
I think the question is/was on-topic, although many users simply don't bother with questions that aren't of the form "why isn't my code working?"
ffs, I just wanted to be able to laugh at the question since I clearly made a dumb mistake with doing sudo pip install and figured folks here might enjoy it.
if you guys want to only have "plz halp my typo code" instead that's fine, but in my experience my question is considerably higher quality than most of the questions
@enderland Praise
the fact is, it should be trivial to do what I wanted to do, but it seems... not trivial unless I want to wipe out ALL my python dependencies installed with pip ever
which presumably will break all sorts of native applications
anyways I deleted it
I can't delete the link above, or I would also do that
13:58
Yeah, I understood that the link was more "haha what an amusing problem" than "everyone come solve this for me", and I was prepared to let it pass without comment.
But everyone else started pointing out that it was technically in violation of the rules (but not spiritually in violation IMO), so I was attempting to soften the stone-throwing by explaining why we're inclined to throw stones in the first place. Not sure if I succeeded though.
Hey, @enderland. Your pip question looked perfectly fine to me.
I have a list of future dates. I want to basically assign a value to them based off the current week as 0 indexed. So 3/24 would be assigned 0, 3/31 assigned 1, 4/5 assigned 2 etc.. What's the easiest way to approach something like this?
Another reason for the "don't link your own fresh question" policy is that if we start brain-storming your question in here the people on the main SO site may not be aware of what we're discussing in here, so we end up getting duplicate / wasted effort.
well the question is deleted, so it's fine now
@clickhere I think I'd solve it like this. Find the first day of this week. For each date in the list, get the timedelta between that date, and the first day of this week. convert the timedelta into number of days, and divide by seven, discarding the remainder. The result is the 0-indexed week number.
14:04
I can probably create a virtualenvironment with --no-site-packages
@enderland please don't link to questions and then delete them
and just manually install everything
@Kevin Linking to your own fresh question for the purpose of meta-discussion by the chatroom, rather than to get us to actually answer the question, seems fine to me. But I guess people need to make that explicit before / when they post the link.
@RobertGrant you can cast undelete votes if you feel so compelled
14:04
@enderland I thought your question was kind of funny, and asking a good question at the same time. Feel free to undelete it.
So you can stop typing your angry resp...never mind, too late :)
I have received enough crap about that question that I don't care enough to bother undeleting it
40 secs ago, by Robert Grant
JOKES
there are plenty of folks here with 10k rep, if 3 of you feel it's worth keeping go for it
Everyone is always coughing so much at work why are people always sick why don't people have immune system
14:06
they won't stay home sick and incubate their sicknesses at work?
Lesson learned: in the future, curtail dogpiling by stepping in early and giving the ~RO Seal Of Approval~ to links that are not in spiritual violation
@Kevin yeah definitely, otherwise it just feels to the person posting that everyone's criticising them
@Kevin same here (as non ro tho :P)
Nope, clearly the best course of action is to make everyone else at work sick and inefficient.
I find it's best just not to comment on it ;)
But I are biased
14:09
I think coming in sick might be one of those things where each individual acting in their own rational self-interest ends up making things worse for everyone.
It's a Prisoner's Dilemma, or a tragedy of the commons, or something. I don't know, I'm not a game theoritician.
Like denying vaccination. Oh wait, that's not rational self-interest:P
user559633
vaccination is for the weak
@Kevin not prisoner's, since they don't come off worse for going to work
hmm
it's a weird sort of parasitism
14:10
I mean, it makes sense for like. A construction worker. But for a software engineer? Why not just WFH?
DSM
DSM
Aaargh. My perfectly-accurate methodology sections are being criticized as not useful for the layman. But they're not really meant for the lay reader, they're meant to protect us when someone who knows what we're talking about reads the section. :-/
I frequently stay home when I'm not feeling well, because I figure 1) I'm going to suffer and be not productive anyways, and being miserable all day for ~2 hours of potential value is a horrible tradeoff and 2) getting other people sick sucks
most people are too proud to admit they aren't that effective when sick, though
@DSM Create a simple wikipedia-esque translated version?
and people would get better sooner without commuting and sitting all day, right?
I seriously hate my manager.
Er, the guy that 'owns' this code.
14:13
@AndrasDeak when I have a cold/feel miserable I normally take a day off and rest and get better considerably faster than people who hack and are miserable for weeks
but... everyone is different, obviously
@enderland same here, at least I'm not capable of doing anything valuable when I'm well into an illness
I'm more than capable of being butt-in-seat though, which is what most people do
googles
what do you mean by butt-in-seat?:D
just showing up and being there, but not necessarily caring about whether you are working
He refuses to let any uncaught exceptions or stack traces in the code. But all that happens when we do that is we're emailed a stack trace. The user doesn't see shit. So now I'm debugging off of a virtually info-less logging message.
14:16
That seems like not what you're supposed to do. What does the user see? Just Oh look, an error.
@enderland Done. :)
user559633
@enderland hey, i don't have 10k rep to see your deleted question, but if you did a sudo pip install pkg_a pkg_b, you at least know the path of what files were modified, so you can go back to that version by finding out what it's supposed to be and downgrading with sudo pip install pkg_a==version (you'll have to uninstall if newer first)
I think it comes down to office culture. A manager can choose to give reputation penalties to employees that call in sick frequently. If he's sly, he won't be explicit about it, he'll just put vague things like "not a team player" on their annual performance review.
What the user sees is handled on a case by case basis. At times we just render a blank screen because I guess that's better than an error. I really have a problem with how this guy was taught.
If a manager does not give out reputation penalties, then this incentivizes all employees to use 100% of their sick time over the course of the year, regardless of whether they're actually sick that often. This results in a performance hit for the team, which might make the manager look bad.
If a manager gives out reputation penalties, then people will only take sick time if they're exceptionally sick. This increases butt-in-chair time, but can cause moderate infectious illnesses to spread throughout the office and reduce productivity, which might make the manager look bad.
14:19
He's not really my 'manager'. Just a senior developer I have to defer to.
So the manager's rational choice is to impose juuuust enough of a reputation penalty that no epidemics occur.
@Kevin a perceived performance hit I think, I suspect plenty of teams would be better overall if they took appropriate time off
It's good to have an "occasional work from home" policy, as then people can try doing a bit of work from home if they're worried about being contagious
@enderland oh, I see, thanks
user559633
@QuestionC oh god, do we work together?
14:20
I'm glossing over a lot of details here, especially things like "workers would be more productive if they had more time off, so taking fake sick time is actually a net gain"
I think you're taking management to Henry Kissinger levels there Kevin.
maybe I should just do the nuclear pip freeze | xargs pip uninstall approach...
and then remove pip from my local install so I only have it in virtualenvironments
user559633
@enderland what version of osx?
@tristan 10.10.5 - Yosemite
user559633
if you can get to a vanilla version of that, yeah, you could pip uninstall and go back
14:21
I should upgrade too, now that I think about it
user559633
one sec, i have 10.10.5 and i don't think i sudo pip installed anything
if you put stuff in virtualenv it's fine. I didn't. x|
user559633
i don't see anything in my pip freeze that would have come with the OS
user559633
maybe you can just uninstall all
also packages being different than their executable names are the WORST
14:23
A chaotic evil manager might impose maximum reputation penalties, and blame the productivity loss entirely on his workers. "I maxed out all the measurable metrics [ie butt in chair time -ed] so it's surely not my fault that we missed the deadline. Give me a raise and more workers"
That sounds like VP material
@tristan Maybe. GreedCo is large, and I suspect these sorts of problems are common here.
user559633
R.R.S. Boaty McBoatface
user559633
user559633
porblem solved
14:26
The manager's rewards depend on how well he manages his overlords, not his underlings.
@tristan I hadn't heard about that. Amazing.
it's why you shouldn't crowdsource serious decisions, lol
All the suggestions are amazing; Boatimus Prime and Usain Boat are also awesome
user559633
@enderland it's why you should. it's the best
I guess it gets them the publicity they want
14:29
The name of an RRS is 'a serious decision'?
is the voting site inaccessible outside the UK?
or just DOSed?
user559633
'nameourship.nerc.ac.uk’s server DNS address could not be found.'
user559633
Titanic III
@tristan I just ran pip freeze | xargs sudo pip uninstall -y -- may God have mercy on my Mac if I uninstalled anything critical...
user559633
@enderland It's OS X, so if you did, the solution is "reboot"
14:31
Morning cbg. Today is toddlers-on-a-plane - The Sequel: The Return of The Toddlers.
> uptime
9:32 up 39 days, 23:18, 8 users, load averages: 2.80 2.69 2.77
but that uptime!
user559633
10:33 up 5230 days, 15:20, 2 users, load averages: 2.27 2.17 1.99
user559633
Come at me bro
my recent record is ~100 days on a laptop
@tristan to be fair I started this job less than two months ago ;-)
14:33
Good time to reboot
user559633
to be fair, i just mashed some keys because uptime is meaningless and i figured i could maybe get a rise out of someone
user559633
DSM
DSM
I knew it!
I was going to comment on the quality of your local power grid
heh I needed virtualenvwrapper. doh
user559633
14:35
i'm pretty sure there's a sendmail server somewhere with 10 years of uptime, powered by sheer hatred
@enderland I'm pretty sure that nothing that comes in the base OSX install is pip-installed
gotta go, see you later
@enderland I admire your guts! That's really having the courage of your convictions
It's pretty easy once you've stripped it down to install virtualenvwrapper and its dependencies - these should be the only things you need to sudo install
well that seems to have worked. though seriously passing xargs to a sudo uninstall was not something fun at all, though I guess at least I could verify the pip freeze first :)
user559633
you could edit sudoers to return "nope, not doing it" if calling sudo pip
14:43
haha
I think I'll be ok now, I didn't grok virtual environments before
though pycharm is a nightmare trying to add it to my environment
you usually add your env to pycharm, not the other way around
their documentation is unbelievably poor, for an IDE
@tzaman err, that's what I mean - setting pycharm to use the env :)
preferences -> project settings -> project interpreter
and just point it at your venv python executable
enderland feels dumb
user559633
yeah, it asks you at project creation time...
14:45
I should email that to myself. I cannot ever find that preference for some reason
I found out pycharm also blows away all your project settings if you forget to export them and move your project on your system... :(
I think I just wrote 100 lines of code that worked on the first try. Today was a good day.
@enderland blows away is a bit harsh
closes your working project and removes all your settings?
14:48
Update: never mind
compiles/runs ---> ship it!
Builds still unstable. Want to strangle someone. Trying to stay outwardly calm while seething inside
Doesn't help the kiddies to know I want to strangle someone
It's surprisingly hard to construct a tree structure from a list of elements, each of which has an indentation level that indicates that it is the direct descendant of the closest element higher in the list with an indentation one level lower.
... In O(N) time.
user559633
@holdenweb i have free weights next to my desk and i lift them for 5 minutes when i get like that. not sure if it's helpful, possible in your office situation, but it's helped me not vent frustrations
@tristan that's OK, I'll just go outside and walk around for five minutes
15:02
@tristan do you really? that's awesome
user559633
@holdenweb that works too. i recently realized that i can't logic my way out of frustration, so i just divert myself
@Kevin On a related note, see the last code block in this answer: stackoverflow.com/a/33914896/4014959
user559633
@enderland yeah, cheers :) heavy recommendation for it, especially if you work from home
@tristan ahhh working at home. I was imagining working in an office and getting frustrated, then lifting weights... seems... maybe could be taken the wrong way :)
user559633
@enderland yeah, that would be pretty aggressive.
15:04
I'm really mad. don't mind me as I lift weights menacingly for 5 minutes. :|
user559633
yeah, clang clang clang, no bro, just give me 5 minutes clang clang
@PM2Ring That looks nicer than my approach. Thanks for the tip.
No worries.
@tristan good idea
Hence the muscle cut when doing Python videos
user559633
@RobertGrant If I'm the size of car at SoPyCon, you'll know that things haven't gone smoothly at work
15:13
:)
When is the next SOPyCon?
Just a chance I might make it this year
April 1st?
As long as it doesn't conflict with PyCon Italia (15-17 April)
Post.prototype.collapse = function(){
  console.log(this);
  //outputs "Window"
}
Despair.
user559633
15:25
SoPyCon is on April 31st this year
14
DSM
DSM
> reliable 1569, raliabill, Scottish, from rely + -able. Not common before 1850; and execrated thereafter in Britain as an Americanism.
Oh, if I replace button.onclick = post.collapse with button.onclick = Post.prototype.collapse.bind(post), then it works. Uh, I think.
DSM
DSM
Today we had our first Python/JS intern apply! @davidism-- see what your flaskery has wrought? Now people are being hired to work on the prototype..
Hey. I am using Python 3.5. I opened scripts folder to open pip. There are 3(pip.exe , pip3.exe and pip3.5.exe). Whenever I open any of them, console opens, flashes something and closes. I want to download selenium module.
"Open" as in double-click on? Those executables are for command-line use
15:32
@holdenweb Yes. double click. How do I use them?
Open them via the command line
how? sorry :P
what am I missing about using PyCharm and a virtual environment and PATH? I cannot seem to run subprocess anymore
@SarthakAgarwal What OS are you on?
I presume Windows
Windows.
got it. thanks.
15:38
Start Menu -> type in cmd.exe to open the command prompt....
Fairy nuffs
Best of luck!
Phew. Finally got addCollapseAndExpandButtonToEachCommentOnEachPageThatContainsCommentsOnHackerNe‌​ws.user.js working the way it did before I lost the original source code.
That's quite the name. Very catchy
You have a spare one of those javascripts?
Here it is, if anyone cares.
The name is only slightly more insane than the naming of many standard JS and DOM functions
15:44
I like the idea of giving hackernews basic UI functionality.
Not necessarily a bad name tho
until you extend the script with unrelated functionality and the name becomes outdated :p
I'm a little dissatisfied with getDescendants because it uses a lot of intermediary lists.
In practice any particular post will have no more than, say, 100 descendants, so it's not a huge deal.
@Kevin: couldn't you rewrite it using Array.prototype.map?
You mean, could I rewrite var allPosts = []; for (node of nodes){allPosts.push(new Post(node));} to use map instead? You're probably right.
Although, hmm, how would I do new inside map... Is there a dunder method for that or something?
allPosts = Array.prototype.map(nodes, Post.__constructor__)?
Lambda it?
15:48
allPosts = nodes.map(function(node) { new Post(node) }) ?
That looks like javascript
using a function is cheating :-P
...you can't think that way if you write javascript
@RobertGrant It is. Ok, I'm done dragging my non-Python business into the room. (for today)
Actually let me revise that to "I'm done dragging my JS business into the room". I still might want to talk about Magic: The Gathering or something.
Oh a friend of mine got on TV for a M:tG tournament not so long ago.
15:55
My fellow cube mates are trying to persuade me to start playing :p
He was on like ESPN 2. That gives him as much sports cred as a dirt biker I think.
DSM
DSM
I've noticed that ESPN's been doing a lot more e-sporty stuff lately. Annoys me when they front-page it and don't front-page hockey, but eh..
Money talks.
not in the real world.
it does get peoples attention but money is inanimate, it can't speak
16:04
Pro gaming is like a zillion dollar industry in South Korea... I think western entertainment will sit up and take notice sooner or later
@Kevin oh sorry, I wasn't paying attention. Didn't even look at your code properly to see what language it was
:-P
Help - I'm stuck in a maze of twisty little dependencies all alike
16:11
Hi. I am in the directory of pip. When I write, install beautifulsoup4, it says install is not recognised. What to do?
Try writing pip install beautifulsoup4 instead.
@Kevin yay thanks :D
@SarthakAgarwal python -mpip install beautifulsoup4
will work without the pip exec, and with the python that you're using
@AnttiHaapala It says Python is not recognised.
then you should make python recognized
16:15
How ?
I tried pip install beautifulsoup4. It says to upgrade using python -m ppip --upgrade... . I type that, it says python not recognised.
Done. Thanks. Used pip install --upgrade pip
Today for lunch I chose a sandwich whose wrapper was labeled "turkey burger nochs".
I thought it might be poorly spelled spanish. Turkey noches - the sandwich of the night.
But now I'm pretty sure it means "no cheese".
16:30
I am the turkey that flaps in the night!
I know, some random person announced it on the mailing list
@RobertGrant inform ThiefMaster also :)
Yeah, that's where I saw it
I'm just going to let it freeze. I can answer Flask stuff just fine here.
I'm going to set up Core Flask
16:59
:-|
There was a Django room, remember? That got frozen. :/
DSM
DSM
There are lots more Python programmers than flask programmers, and there are times when this room is silent for many hours. I'd be surprised if there were enough flask types to maintain a room, but best of luck to them if they're interested.
True that.
In a few days, We'll get to know. All the best to them :)
Yeah I can't see it working outside of Q&A, and I'd imagine most answerers would rather be asked via the SO site
17:24
Interesting to no one but me: I'm reading through the archives of 1950s comic King Aroo and one of the characters is a clear reference to my Alma Mater, Drexel University.
The character is a dragon named Drexel, and the university athletic teams are all named the Drexel Dragons.
is there a way to run 2to3 on a small code segment from within python? I know there is a lib2to3 but it only seems to take files.
I'd like to just be able to do checkcode("cmp(a,b)") or checkcode("execfile(a,b,c)") and see the equivalent code for python 3, is that possible or do I need to just use a file?
Hmm, I wonder if you could do something with StringIO...
Ok well I was going to look up lib3to3's documentation but there doesn't appear to be any.
Hey. I am learning web scraping and not able to find any good tutorials. Can you suggest any? Using py 3.5
17:40
Web scraping is easy. You get the HTML, pass it through BeautifulSoup, and extract whatever information you need.
All the videos I have found on youtube are no good.
That does not surprise me because I have never found a good tutorial on youtube for any programming concept.
haha. alright. I'll search some more on google :)
The beautifulsoup documentation should contain all the information you require to extract useful data from html.
@Kevin Awesome. Thanks!
17:48
@Kevin I have been looking at the source for lib2to3 and it seems to only use filenames until lib2to3.refactor.RefactoringTool._read_python_source
probably because it was designed to be able to convert entire directories, small code snippit were not exactly intended use.
Blergh.
DSM
DSM
18:13
Blergh?
user559633
**blarggs
18:34
@tristan you do realise we actually have 31st April in UK, right?
Naturally. Only the US has the fourth of July, so every other country needs to add a day somewhere in order to stay in sync.
Yeah, weird the way July goes straight to 5 from 3
@AnttiHaapala cbg
Tangentially related: The Witching Hour
18:37
friend was asked "do you celebrate 7/4 in Finland" - "yes, our 7/4 is in December"
and what's 7/4?
1.75, I guess, you use python 3
oh, 7 is July
nevermind:D
DSM
DSM
@Kevin: did we ever find a good canonical "you forgot a return in your recursion" Q/A?
If we did, I have since forgotten about it.
18:51
Whoa, four Python posts in this week's SO newsletter top posts section. Plus a bonus one in the Can you answer these section.
Nice.
wat. I don't know turtle...are those eval(input())s really necessary?
Python is too mainstream for me now, sorry. I need to go learn Rust.
Wow, just hit "one of those answers" yesterday, and the points are steadily accumulating with no effort on my part
18:53
@AndrasDeak No, it's not necessary. It's a fairly common mistake by newbies - they don't know how to convert the string returned by input into an integer, so they use eval instead of int()
shivers
Possibly they read beforehand that "input() in 2.7 is equivalent to eval(input()) in 3.X" and thought it meant that the latter code is recommended in 3.x
Of course back in the days of Python 2 (drools into beard) the eval was built into input and you had to call raw_input to avoid it
user559633
@Ffisegydd Yes. How else would it be on the 31st?
@MartijnPieters Was just about to say that.
18:55
OP read a comment saying "you should use mixedCase" and in the end decided to use only lowercase letters, so it's entirely possible his reading comprehension isn't stellar
Congrats @holdenweb for making it into the NL :)
That's mean. I'm sorry I said you can't read, OP.
DSM
DSM
I didn't even know there was an SO newsletter.
fortunately, they can't read this
18:56
@Kevin don't worry about it.
DAMNIT!
haha
Kevin'd!
@holdenweb yup, meaningless gold answer badge collected! ca-ching
@DSM They usually mail one on Wed if you are registered
@holdenweb: I see you are nearly there too; almost guaranteed now.
18:58
I subscribed to the newsletter and have literally never read it. I delete it every week it comes in. Been doing it for years. I should really unsub.
DSM
DSM
That.. would make sense.

« first day (1984 days earlier)      last day (3184 days later) »