« first day (2899 days earlier)      last day (2040 days later) » 

12:08 AM
@SaltyHelpVampire What's IDLE got to do with it? IDLE is an environment for coders, it's not intended for normal users to run Python scripts. FWIW, plenty of coders don't use IDLE either.
 
 
2 hours later…
1:39 AM
@user2357112 There would've been less carnage if you hadn't reopened it. ;) stackoverflow.com/questions/52462066/…
 
 
6 hours later…
7:13 AM
@OvieAdese no, it's a micro (web) framework for Python - flask.pocoo.org
 
8:10 AM
I am not sure why but jupyter notebook slows down the browser. I am following this tutorial coursera.org/learn/ml-foundations/lecture/Hzb0F/…
 
8:54 AM
The length of this question... stackoverflow.com/questions/52406058/…
 
The 50 rep bounty makes up for it though!
 
If only you got 50 rep for reading the question.
Let alone answer it.
 
 
2 hours later…
11:05 AM
Let's vote: Who's in favor of a generic "Why does assigning the result of a list/set/dict operation back to the variable turn it into None?" canonical to replace all the annoying "Why does list.append/list.remove/list.reverse/random.shuffle turn my list into None" questions?
 
11:22 AM
Cabbage
@Aran-Fey Sounds good to me. Is there a complementary question of "Why do I have to assign the result of str.replace, str.lower, etc"?
 
stackoverflow.com/questions/52465250/… was closed because it was in Russian, now OP made in English
 
@shad0w_wa1k3r Should we tell them to add the Python tag, and to fix all those typos?
 
@PM2Ring There's this
 
@PM2Ring yeah, you can :-p
 
@Aran-Fey Fine. In fact I'd already upvoted the question and the accepted answer.
 
11:29 AM
too broad / unclear / typo (you choose) stackoverflow.com/questions/52465092/…
 
@shad0w_wa1k3r Ok, I will. OTOH, I don't know if I want to encourage them. :)
 
ah yes, anyway, I will make the comment then, since I'm the one who posted here.
(trim length + add missing tag)
@shad0w_wa1k3r 1 reopen vote remaining
 
FWIW, I recently added django, pandas & tensorflow to my ignored tags.
 
 
1 hour later…
12:49 PM
cabbage
 
1:03 PM
@Aran-Fey Despite the title, the OP wants a dict.
 
That dict would be better off as a list
 
Probably.
 
If the OP wanted a list, we'd now have a nice Q&A for "how do I parse a space-separated list", but of course since OPs always have special nonsensical requirements, it's now a wasted Q&A instead
 
1:36 PM
cbg
@PM2Ring I am sorry for the late reply. I meant "not many computers have IDLE" as "not many computers have a python interpreter", but I didn't know that IDLE wasn't so widespread, neither that it wasn't required to run python. My bad
 
1:54 PM
@PM2Ring meh... gmpy's just cheating though... ;)
 
@JonClements I guess so. But so is hacking the C source of bin. :) FWIW, on a random million bit int, gmpy.popcount is around 30 times faster than using bin.
 
so is hacking the C source of bin... yeah... as soon as I'd typed that, that thought occurred to me... was kind of hoping no one would notice though... alas not :)
 
@SaltyHelpVampire No worries. Yeah you don't need IDLE to run Python, but it is a standard part of the Python installation. I tried using it once or twice, but I found it too annoying.
 
It's standard on Windows... it's not on linux - not sure about mac...
 
Ah, ok. I have idle3.6 on this Linux machine, but I did compile Python 3.6.0 myself. With lots of help from Antti.
 
2:00 PM
hi friends....browser saves session-id in cookies that lets u login automatically next time u visit website. does it happen entirely from web-browser's side or u hav to code something about it while developing the app?
 
That cookie content comes from the server - so there's server side implementation that needs to be done as well...
 
alright
if there were no cookies, would u get logged out once you close the tab (not the window)?
 
Jon only comes when there are cookies, so...
 
@ArunRaaj none of your recent questions are strictly Python-related, maybe this room isn't the best place to ask them?
These are also about the very basics of web development. Please pick up a good tutorial on that subject and/or do a bit of research yourself.
 
2:28 PM
cbg
 
stackoverflow.com/q/22573624/1222951 no mcve/unclear, also ancient with 1k views. None of the answers have any upvotes either.
 
@AndrasDeak strangely never any left just before leaving though :)
 
2:43 PM
Hey any xpath2.0 evaluator library available for python?
 
@Aran-Fey They now have couple of downvotes. ;) I'll keep the tab open so I can del-vote it ASAP.
@JonClements Oh dear. I posted my standard LPTHW warning comment.
 
3:28 PM
@Aran-Fey 1 more close vote go
 
It's gone.
 
One down, half a million to go. ;)
 
half a million, and counting
 
keep shooting 🔫
 
3:35 PM
though quite a few OPs have been quick to delete their questions in response to 1 or 2 down-/close votes lately
 
they can't stand the toxicity
 
And answerers. Half the time I don't even need to downvote. I post a constructive suggestion, but instead of fixing their answer, they just delete it. But I guess that's mostly because they realise that if they implement my fix it'll turn their answer into a clone of an existing one.
yesterday, by PM 2Ring
I must have the touch of death today. Almost every question or answer I've commented on has been self-deleted. But I think the last one is just temporary while he figures out how to make his answer work properly.
 
What's the opposite of "hand of midas"? :-p
 
The creativity is off the charts.
 
3:43 PM
that's urbandictionary for you
 
I originally heard it in a movie with Lindsay Lohan, so
 
Also see Glod
 
4:30 PM
Did... did this guy just take a screenshot of his markdown because he couldn't get the formatting right?
 
>>> def spam():
...    global eggs
...    eggs = 'spam'
...
>>> def bacon():
...    eggs = 'bacon'
>>> def bacon():
...    eggs = 'bacon'
...
>>> def ham():
...    print(eggs)
...
>>> eggs = 42
>>> spam()
>>> print(eggs)
spam
why the code above prints spam instead of 42; didn't I overwrote global eggs by typing eggs = 42?
 
@TaluyBaatar Yes, you overwrote global eggs, but then you overwrote it again when you called spam.
 
@PM2Ring Thank you! So, it was a code-play...
 
5:00 PM
 
5:43 PM
stackoverflow.com/questions/52468598/… beyond too broad. Too too broad.
^ closed, thanks
 
6:44 PM
recbg
 
7:20 PM
hello
obs_temporary['clouds']['cloud_layer_{}'.format(iter_count+1)] = {
    'amount': cloud_amount,
    'base': cloud_base
}
I get a an error when I try to do this
KeyError: 'clouds'
I guess because I have not created the 'clouds' in the dict yet
 
Yes
 
any way I can create a key and the child key too?
clouds is just going to have another dict in it
 
You could assign obs_temporary['clouds'] = {} first
 
Alternatively, check out defaultdict
 
interesting
Not familiar with classes yet, but I will keep it in the back of my mind
 
7:34 PM
Another alternative is .setdefault‌​, like I just used here and here
 
Or obs_temporary.setdefault('clouds', {'cloud_layer_{}'.format(iter_count+1): {'amount': cloud_amount,'base': cloud_base}}). Clear as mud.
PM'ed, sort of, but I gave a complete and concise solution ;)
it's convoluted enough that I had to check before posting :D
 
uggh I gotta go to work but i will check up on all this stuff later
 
@Vader defaultdict is just an enhanced version of dict which automatically creates items for you if you attempt to access keys that don't exist yet. It's cute, but I generally prefer to use a plain dict.
 
thanks @vaultah @Aran-Fey @PM2Ring @AndrasDeak
 
@AndrasDeak Yeah, it can get a bit convoluted. :)
 
7:39 PM
the clearest is just creating these keys with empty dicts assuming you only have a handful fixed ones of them to create once
 
@AndrasDeak what im doing right now
obs_temporary['clouds'] = {}
 
yup, that's fine
 
Simple enough for me to understand for now
 
and others too :)
trying to be too smart is a thing
 
weird that this didnt throw an erorr though
if cloud.group() == 'CLR':
    obs_temporary['clouds'] = { 'cloud_layer_{}'.format(iter_count+1) : {
        'amount': 'CLR',
        'base': None
        }
    }
 
7:41 PM
Why should it? You're explicitly creating a new item with key 'clouds'.
the problem in your original is that you're trying to create a new key 2 levels deep, i.e. referring to the key 'clouds' (by trying to mutate the corresponding value) when it doesn't exist yet
 
ahh
thanks for the help, really gotta go now
cya
 
dct[key] = val means "create an item with key:val or overwrite an existing one". dct[key1][key2] = val means "take the item at key1, and set its key2 to val" which assumes that key1 exists and its value can be indexed with key2
no worries, bye
 
8:18 PM
Streaming at twitch.tv/codeguru42. More Material Design with Navigation Drawer
 
 
2 hours later…
10:45 PM
stackoverflow.com/q/52470424/4909087 not a real question (unclear)
 
10:57 PM
stackoverflow.com/q/52469136/1222951 too broad (asked 3 separate questions) (20k)
 

« first day (2899 days earlier)      last day (2040 days later) »