« first day (4374 days earlier)      last day (557 days later) » 

2:54 AM
I'm working on something important in the canon-discussion room and I'd like to draw attention to chat.stackoverflow.com/transcript/message/55338556#55338556 if it isn't too much of a bother.
 
3:25 AM
@KarlKnechtel looking really good, maybe explain PATH a bit more in a sidebar, and python3 and pip3 vs python and pip v2 on some Debian (and Ubuntu, Mint etc) versions
 
3:36 AM
@ChrisP as an aside, it always strikes me as weird to use a list of arguments with shell=True; this happens to work on Windows, but will break on other platforms when there is more than one argument on the list (unless you know precisely what you are doing, and the first argument on the list is a command which knows where to look for the rest); and anyway, there seems to be no reason to use shell=True here
 
 
1 hour later…
4:56 AM
@tripleee hold on, "pip v2"?
 
5:52 AM
just as a shorthand for "what you get when pip runs for Python 2.x"
 
On reflection, it could have been that OP's '1' came from user input, and thus should actually have been referred to the "read inputs as numbers" canonical. But I don't really want to try to read someone's mind from 10 years in the past, and I think the canonical is younger than that
 
7:38 AM
Found a fun wontfix:
>>> inspect.unwrap(obj.method1)
<bound method Demo.method1 of <__main__.Demo object at 0x0000028A62F7BD90>>
>>> inspect.unwrap(obj.method2)
<function Demo.method2 at 0x0000028A6324E200>
Anyone care to guess what the difference between the two methods is?
 
second one is @staticmethod?
 
added dynamically or classmethod?
 
Very close. method2 has a decorator. Doesn't matter what kind as long as it uses @functools.wraps
Or rather, as long as it gives the function a __wrapped__ attribute. The bound method "inherits" this attribute and becomes unwrappable
 
wait, hold on. "unwrappable" as in "able to be unwrapped", or "unwrappable" as in "not able to be wrapped again"?
 
able to be unwrapped
unwrap-able
 
8:14 AM
so that's a bug in functools.wraps, right? the expectation would be that the wrapped function has the same metadata as the unwrapped one
I think I remember wim complaining about functools.wraps in the past, and saying that they use a third part for wrapping which was superior
 
8:27 AM
Adding the __wrapped__ attribute is kind of the point of functools.wraps :P
I think they need to either remove the __wrapped__ attribute from bound methods, or add a special case for bound methods in inspect.unwrap
 
 
3 hours later…
10:59 AM
@Aran-Fey looks like bound methods should "wrap" the unbound method, right?
 
Hello, is there any way to use: msg = p1.stdout.readline() with a timeout parameter?
 
I'd prefer if bound methods didn't have a __wrapped__ attribute at all. You can already access the unbound method through __func__ anyway
@ChrisP Maybe, but almost certainly not in a cross-platform way. If it's possible at all, it'll involve some os-level interaction with the file handle
 
The msg would be an str Exception of process exe.
 
@ChrisP not directly with Python's io. There are some third-party packages to do that.
You could .peek into stdin whether there's a newline available. That's probably going to have some edge cases, though.
 
Actually, this should be pretty straightforward if you just use asyncio
 
11:12 AM
If you are the only one reading, it should be pretty simple to have one thread/task do the reading and push each line into a queue.
 
 
10 hours later…
8:59 PM
wow! It's really quiet in here today
 
yep, sure is
 
ah yes, I remember this movie. I think I watched part of it back then, but forgot if I actually finished it
I didn't watch the first movie though
 
I've watched neither... I need to
 
9:41 PM
I need help naming something. I made a browser addon that basically adds a volume slider to every tab. Problem is, there is no reliable way to modify a website's volume - I've implemented a bunch of different solutions, and added a dropdown list where the user can select one. How should I label this in the UI? "Method"? "Workaround"? "Strategy"?
 
why not go with "Option"?
it sounds weird I admit, but I recall a lot of dropdown menu showcasing different things that could work, if another one doesn't are called that
maybe "Algorithm" would work too?
 
I don't like "option" because it tells the user even less than the other options do... If you read "strategy", you wonder what the strategy is for, but the addon does exactly 1 thing, so it's not too hard to make the connection. "Option" tells you nothing
 
alright, what about "Algorithm" then?
 
"Algorithm" is not bad
 
hmm
maybe "Function" would work too, but it might be worse compared to "Algorithm"
 
9:56 PM
"Function" sounds like it makes the addon do something else IMO
It's more of a "what" than a "how"
Maybe I should just label it "How?" haha
 
Volume Changer?
Vector?
 
Wait, vector? O.o Vector of what?
Does vector have a meaning I'm not aware of? Let me google this
> a course or compass direction especially of an airplane
I guess that makes sense
Here's a screenshot of what it currently looks like, if that helps
 

« first day (4374 days earlier)      last day (557 days later) »