« first day (3138 days earlier)      last day (1800 days later) » 

8:02 PM
@wim I don't understand the order of how what is getting assigned to who or when..... argha!
 
@piRSquared i had to look it up. python resolves that really "Weirdly". here
apparently theres a hidden "temp" variable, and then everything gets assigned to that left to right.
 
Straight up borrowing from the future. This is quantum Python x = x[0] = {}
 
wim
@piRSquared 🤯
 
This evaluates to True
w, x = x[0], w[0], = [{}] * 2
w == x
What does this evaluate to:
w, x = x[0], w[0], = {}, {}
w == x
 
aah, my brain, it hurts
 
8:20 PM
Part II: This is also True
w, x = x[0], w[1], = [{}] * 2
w == x
While this is False
 
@wim hey, I knew that one
 
w, x = x[0], w[1], = {}, {}
w == x
 
@Kevin I noticed it's a bit troublesome to always have 2 code blocks per riddle so that the 2nd one is properly hidden. What do you think of doing something like this?
 
8:34 PM
How's this for a puzzle?
try:
    w, x = x[0], w[1] = ...  # Your Code Here
except:
    raise Exception('Does Not Compute.  Try Again.')

assert w == x, 'Not Equal!'
print('You win!')
The answer is above but that's privileged knowledge for those of use here right now.
 
part of the magic is hiding the "multiple asignment" itself though
granted, it makes it difficult to solve if you dont have the context for it
 
Kicking myself for having scrolled up without properly trying first
 
wim
quick platform implementation poll ... if you hash -inf do you get the digits of pi or the digits of e?
 
Manjaro linux, pi
 
pi
also redhat
 
8:42 PM
@piRSquared Want me to add it to the list?
 
Sure
Am I right to think you can't catch a SyntaxError outside an eval?
 
compile() builtin too, probably
 
wim
and exec
 
That is, I think those are the only places you can catch a SyntaxError, otherwise the code wouldn't run in the first place
 
Well I mean, you can just throw a SyntaxError if you want (and then catch it)
 
wim
8:46 PM
raise :P
 
What is this, C++?
 
Pardon: You can raise a SyntaxError if you want and then except it
 
wim
ugh, git grepping in CPython takes forever
 
def hand():
    try:
        raise SyntaxError
    except SyntaxError:
        eye()

def eye():
    print('Tossing and catching to improve hand/eye corrdination.')

hand()
 
wim
git shortlog -s -n <-- wow, Guido is still the top by a long shot
 
8:56 PM
@wim pi on Windows too
 
wim
is there any function in CPython to check whether a given string/int is currently interned?
 
pickle.loads(pickle.dumps(x)) is x *shrug*
 
wim
9:23 PM
^ doesn't work
 
Every so often a question pops up that makes me feel dumb that I don't seem to be invoking such complex Python constructs. Does this make sense? I'm for sure not saying the question is bad, but am I missing something about all the complexity it's piling in?
Working with JSON all the time, I wonder why I've never had the need to build something like that. It's either a hole in my knowledge or things being taken too far?
 
wim
9:39 PM
I don't know why they would do that as opposed to just using __annotations__
 
 
1 hour later…
10:39 PM
Hi
Anyone help how to retrieve data from omdb movie site in python through web API
 
He's deserialized :) Hi
 
Hi
I have downloaded the data but need data for two years. I tried so many ways but not successful
 

« first day (3138 days earlier)      last day (1800 days later) »