workspace
stringclasses
1 value
channel
stringclasses
1 value
sentences
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
sentence_id
stringlengths
44
53
timestamp
float64
1.5B
1.56B
__index_level_0__
int64
0
106k
pythondev
help
When it hit's the Repos Frame, it gets to this function
2017-07-27T11:37:28.920152
Myong
pythondev_help_Myong_2017-07-27T11:37:28.920152
1,501,155,448.920152
87,503
pythondev
help
`self.submit = Button(self, text="Submit", command=submit(self, controller))`
2017-07-27T11:37:53.937439
Myong
pythondev_help_Myong_2017-07-27T11:37:53.937439
1,501,155,473.937439
87,504
pythondev
help
Neither will a function though
2017-07-27T11:38:21.955988
Beula
pythondev_help_Beula_2017-07-27T11:38:21.955988
1,501,155,501.955988
87,505
pythondev
help
which breaks at the last line
2017-07-27T11:38:24.957682
Myong
pythondev_help_Myong_2017-07-27T11:38:24.957682
1,501,155,504.957682
87,506
pythondev
help
With a key_error
2017-07-27T11:38:30.962053
Myong
pythondev_help_Myong_2017-07-27T11:38:30.962053
1,501,155,510.962053
87,507
pythondev
help
`Button(self, text="Submit", command=submit(self, controller))`
2017-07-27T11:39:01.983071
Suellen
pythondev_help_Suellen_2017-07-27T11:39:01.983071
1,501,155,541.983071
87,508
pythondev
help
here you're not saying "call `submit` when clicked"
2017-07-27T11:39:25.998653
Suellen
pythondev_help_Suellen_2017-07-27T11:39:25.998653
1,501,155,565.998653
87,509
pythondev
help
let me try `lambda: func()`
2017-07-27T11:39:27.000265
Myong
pythondev_help_Myong_2017-07-27T11:39:27.000265
1,501,155,567.000265
87,510
pythondev
help
you call `submit` and return a value, and assign this value to `command`
2017-07-27T11:39:40.008375
Suellen
pythondev_help_Suellen_2017-07-27T11:39:40.008375
1,501,155,580.008375
87,511
pythondev
help
wut
2017-07-27T11:44:37.206352
Suellen
pythondev_help_Suellen_2017-07-27T11:44:37.206352
1,501,155,877.206352
87,512
pythondev
help
here's a piece of code from a project of mine which uses Tk: ``` self.master.after(timeout, lambda: self.update_treeview(treeview, data, timeout)) ```
2017-07-27T11:45:30.242377
Suellen
pythondev_help_Suellen_2017-07-27T11:45:30.242377
1,501,155,930.242377
87,513
pythondev
help
the same principle
2017-07-27T11:45:38.247910
Suellen
pythondev_help_Suellen_2017-07-27T11:45:38.247910
1,501,155,938.24791
87,514
pythondev
help
It works
2017-07-27T11:46:52.296761
Myong
pythondev_help_Myong_2017-07-27T11:46:52.296761
1,501,156,012.296761
87,515
pythondev
help
:slightly_smiling_face:
2017-07-27T11:47:01.302682
Suellen
pythondev_help_Suellen_2017-07-27T11:47:01.302682
1,501,156,021.302682
87,516
pythondev
help
also `lambda: func()` works. Should have just done that....
2017-07-27T11:47:21.316431
Myong
pythondev_help_Myong_2017-07-27T11:47:21.316431
1,501,156,041.316431
87,517
pythondev
help
<@Suellen> since it seems you've used tkinter, what's the best way to go about passing data to another Frame. I'm trying to grab a selection and place it inside a label to show a user what they selected, but in the same way as before it places the default value into the label instead of grabbing the updated one.
2017-07-27T12:02:52.938750
Myong
pythondev_help_Myong_2017-07-27T12:02:52.938750
1,501,156,972.93875
87,518
pythondev
help
If `lambda: func()` works just `func` should also work...
2017-07-27T12:02:57.941753
Beula
pythondev_help_Beula_2017-07-27T12:02:57.941753
1,501,156,977.941753
87,519
pythondev
help
But it doesn't that's the thing lol
2017-07-27T12:03:06.947853
Myong
pythondev_help_Myong_2017-07-27T12:03:06.947853
1,501,156,986.947853
87,520
pythondev
help
Lambda is just a function reference, without a name. so setting `lambda: func()` is the same as `func`
2017-07-27T12:03:32.964659
Beula
pythondev_help_Beula_2017-07-27T12:03:32.964659
1,501,157,012.964659
87,521
pythondev
help
Sounds like some other error, but if it works that's good :smile: ¯\_(ツ)_/¯
2017-07-27T12:04:16.994138
Beula
pythondev_help_Beula_2017-07-27T12:04:16.994138
1,501,157,056.994138
87,522
pythondev
help
It's because it, for whatever reason attempts to access a key in a dict that doesn't exist and it steps into the function i attach to `command` if I just do `lambda: func()` it doesn't actually go into the function til it's finally clicked
2017-07-27T12:06:22.075041
Myong
pythondev_help_Myong_2017-07-27T12:06:22.075041
1,501,157,182.075041
87,523
pythondev
help
<@Beula> `func` and `lambda: func(foo, bar)` are different :wink:
2017-07-27T12:06:44.089417
Collette
pythondev_help_Collette_2017-07-27T12:06:44.089417
1,501,157,204.089417
87,524
pythondev
help
Which is why I recommended using a partial as an alternative
2017-07-27T12:07:07.103823
Beula
pythondev_help_Beula_2017-07-27T12:07:07.103823
1,501,157,227.103823
87,525
pythondev
help
Anyway, in tkinter you see a ton of `lambda: thing()` so it't not out of the norm :smile:
2017-07-27T12:07:57.136026
Beula
pythondev_help_Beula_2017-07-27T12:07:57.136026
1,501,157,277.136026
87,526
pythondev
help
<@Myong> can you show a bit of code? maybe it's something obvious
2017-07-27T12:14:17.369673
Suellen
pythondev_help_Suellen_2017-07-27T12:14:17.369673
1,501,157,657.369673
87,527
pythondev
help
nooo waaay
2017-07-27T12:18:33.525022
Suellen
pythondev_help_Suellen_2017-07-27T12:18:33.525022
1,501,157,913.525022
87,528
pythondev
help
you, mister, should have a cup of coffee :coffee:
2017-07-27T12:19:01.541554
Suellen
pythondev_help_Suellen_2017-07-27T12:19:01.541554
1,501,157,941.541554
87,529
pythondev
help
I actually got it
2017-07-27T12:19:31.559267
Myong
pythondev_help_Myong_2017-07-27T12:19:31.559267
1,501,157,971.559267
87,530
pythondev
help
I just pass the controller in, grab the dictionary of frames and get the variable from the corresponding frame
2017-07-27T12:19:46.568387
Myong
pythondev_help_Myong_2017-07-27T12:19:46.568387
1,501,157,986.568387
87,531
pythondev
help
But this is quite annoying :slightly_smiling_face:
2017-07-27T12:19:54.573698
Myong
pythondev_help_Myong_2017-07-27T12:19:54.573698
1,501,157,994.573698
87,532
pythondev
help
That was my experience with most desktop ui programming, it's a little funky what you have to do
2017-07-27T12:20:54.609375
Beula
pythondev_help_Beula_2017-07-27T12:20:54.609375
1,501,158,054.609375
87,533
pythondev
help
especially since Tk is sooo barebones
2017-07-27T12:21:14.621459
Suellen
pythondev_help_Suellen_2017-07-27T12:21:14.621459
1,501,158,074.621459
87,534
pythondev
help
I just need 4 screens
2017-07-27T12:21:40.636904
Myong
pythondev_help_Myong_2017-07-27T12:21:40.636904
1,501,158,100.636904
87,535
pythondev
help
that's it
2017-07-27T12:21:42.638484
Myong
pythondev_help_Myong_2017-07-27T12:21:42.638484
1,501,158,102.638484
87,536
pythondev
help
there's a good side though: you better understand what happens under the wraps in other GUI frameworks
2017-07-27T12:21:43.638884
Suellen
pythondev_help_Suellen_2017-07-27T12:21:43.638884
1,501,158,103.638884
87,537
pythondev
help
god is this bad
2017-07-27T12:21:46.640666
Myong
pythondev_help_Myong_2017-07-27T12:21:46.640666
1,501,158,106.640666
87,538
pythondev
help
Should have just made a frontend, honestly
2017-07-27T12:22:02.650435
Myong
pythondev_help_Myong_2017-07-27T12:22:02.650435
1,501,158,122.650435
87,539
pythondev
help
just attempting to format this is so bad.
2017-07-27T12:23:40.708157
Myong
pythondev_help_Myong_2017-07-27T12:23:40.708157
1,501,158,220.708157
87,540
pythondev
help
That's a bit rude, but I challenge you to show me how this case above is not the same, vs just saying it's not. Here is proof it is: ``` &gt;&gt;&gt; def foo(): ... print("foo") ... &gt;&gt;&gt; bar = lambda: print("bar") &gt;&gt;&gt; foo() foo &gt;&gt;&gt; bar() bar ``` You can pass around `bar` or `foo` to any function that needs a callable (with no args in this case)
2017-07-27T12:24:27.735698
Beula
pythondev_help_Beula_2017-07-27T12:24:27.735698
1,501,158,267.735698
87,541
pythondev
help
``` &gt;&gt;&gt; type(foo) &lt;class 'function'&gt; &gt;&gt;&gt; type(bar) &lt;class 'function'&gt; ```
2017-07-27T12:24:46.746978
Beula
pythondev_help_Beula_2017-07-27T12:24:46.746978
1,501,158,286.746978
87,542
pythondev
help
something like this, in a 2x2 grid?
2017-07-27T12:25:37.776971
Suellen
pythondev_help_Suellen_2017-07-27T12:25:37.776971
1,501,158,337.776971
87,543
pythondev
help
rude? man, I specifically joked about a cup-of-coffee so that doesn't seem rude :disappointed:
2017-07-27T12:26:30.808725
Suellen
pythondev_help_Suellen_2017-07-27T12:26:30.808725
1,501,158,390.808725
87,544
pythondev
help
&gt; nooo waaay
2017-07-27T12:27:35.847323
Beula
pythondev_help_Beula_2017-07-27T12:27:35.847323
1,501,158,455.847323
87,545
pythondev
help
I legitimately just have two frames of a 2 labels, a dropdown and a button
2017-07-27T12:27:40.850587
Myong
pythondev_help_Myong_2017-07-27T12:27:40.850587
1,501,158,460.850587
87,546
pythondev
help
Is what I was referring to
2017-07-27T12:27:41.851274
Beula
pythondev_help_Beula_2017-07-27T12:27:41.851274
1,501,158,461.851274
87,547
pythondev
help
and I can't get them to do anything lol
2017-07-27T12:27:47.855007
Myong
pythondev_help_Myong_2017-07-27T12:27:47.855007
1,501,158,467.855007
87,548
pythondev
help
Format wise
2017-07-27T12:27:51.856987
Myong
pythondev_help_Myong_2017-07-27T12:27:51.856987
1,501,158,471.856987
87,549
pythondev
help
&gt; You can pass around `bar` or `foo` to any function that needs a callable (with no args in this case)
2017-07-27T12:28:19.873458
Suellen
pythondev_help_Suellen_2017-07-27T12:28:19.873458
1,501,158,499.873458
87,550
pythondev
help
this is actually what I should have showed ``` &gt;&gt;&gt; def foo(): ... print("foo") ... &gt;&gt;&gt; bar = lambda: foo() &gt;&gt;&gt; &gt;&gt;&gt; foo() foo &gt;&gt;&gt; bar() foo ```
2017-07-27T12:28:24.876897
Beula
pythondev_help_Beula_2017-07-27T12:28:24.876897
1,501,158,504.876897
87,551
pythondev
help
Yes, you're right 100%
2017-07-27T12:28:30.880245
Suellen
pythondev_help_Suellen_2017-07-27T12:28:30.880245
1,501,158,510.880245
87,552
pythondev
help
but
2017-07-27T12:28:41.886693
Suellen
pythondev_help_Suellen_2017-07-27T12:28:41.886693
1,501,158,521.886693
87,553
pythondev
help
effectively foo and bar are the same here
2017-07-27T12:28:43.888136
Beula
pythondev_help_Beula_2017-07-27T12:28:43.888136
1,501,158,523.888136
87,554
pythondev
help
tkinter callbacks don't accept arguments, they are all callables compatible with `lambda: x`
2017-07-27T12:29:37.919839
Suellen
pythondev_help_Suellen_2017-07-27T12:29:37.919839
1,501,158,577.919839
87,555
pythondev
help
but you almost always need to pass something that takes a whole lot of arguments
2017-07-27T12:30:06.937005
Suellen
pythondev_help_Suellen_2017-07-27T12:30:06.937005
1,501,158,606.937005
87,556
pythondev
help
This talk wasn't directly about tkinter
2017-07-27T12:30:30.951262
Beula
pythondev_help_Beula_2017-07-27T12:30:30.951262
1,501,158,630.951262
87,557
pythondev
help
therefore it's a common pattern to hide the stuff that you actually need to do behind a simple unassuming lambda
2017-07-27T12:30:33.952986
Suellen
pythondev_help_Suellen_2017-07-27T12:30:33.952986
1,501,158,633.952986
87,558
pythondev
help
that was the general context, but not to my comment about `lambda: foo()` and `foo` being the same
2017-07-27T12:30:46.961225
Beula
pythondev_help_Beula_2017-07-27T12:30:46.961225
1,501,158,646.961225
87,559
pythondev
help
alright I got it. Now I need a progress bar.
2017-07-27T12:31:13.977577
Myong
pythondev_help_Myong_2017-07-27T12:31:13.977577
1,501,158,673.977577
87,560
pythondev
help
alright then :slightly_smiling_face:
2017-07-27T12:31:43.995924
Suellen
pythondev_help_Suellen_2017-07-27T12:31:43.995924
1,501,158,703.995924
87,561
pythondev
help
we're both wrong and right in 50% of contexts :slightly_smiling_face:
2017-07-27T12:32:06.009426
Suellen
pythondev_help_Suellen_2017-07-27T12:32:06.009426
1,501,158,726.009426
87,562
pythondev
help
solve one problem, another pops up
2017-07-27T12:32:36.026961
Meg
pythondev_help_Meg_2017-07-27T12:32:36.026961
1,501,158,756.026961
87,563
pythondev
help
tkinter.ttk has a progressbar widget
2017-07-27T12:32:44.032007
Suellen
pythondev_help_Suellen_2017-07-27T12:32:44.032007
1,501,158,764.032007
87,564
pythondev
help
:stuck_out_tongue:
2017-07-27T12:50:23.644981
Beula
pythondev_help_Beula_2017-07-27T12:50:23.644981
1,501,159,823.644981
87,565
pythondev
help
I was being too literal, my apologies (sorry, had to run into a quick meeting)
2017-07-27T12:50:39.654167
Beula
pythondev_help_Beula_2017-07-27T12:50:39.654167
1,501,159,839.654167
87,566
pythondev
help
^^ Could anyone explain what I’m doing wrong to get the error there?
2017-07-27T13:15:16.521980
Sade
pythondev_help_Sade_2017-07-27T13:15:16.521980
1,501,161,316.52198
87,567
pythondev
help
i have a feeling it’s just a weird typo that i’m not seeing
2017-07-27T13:15:26.527741
Sade
pythondev_help_Sade_2017-07-27T13:15:26.527741
1,501,161,326.527741
87,568
pythondev
help
I’m noticing an immediate syntax error
2017-07-27T13:17:25.595114
Winnifred
pythondev_help_Winnifred_2017-07-27T13:17:25.595114
1,501,161,445.595114
87,569
pythondev
help
can you even use comments in a dict?
2017-07-27T13:17:29.597088
Meg
pythondev_help_Meg_2017-07-27T13:17:29.597088
1,501,161,449.597088
87,570
pythondev
help
`replication ,` can’t happen
2017-07-27T13:18:15.622881
Winnifred
pythondev_help_Winnifred_2017-07-27T13:18:15.622881
1,501,161,495.622881
87,571
pythondev
help
you mean `replication, `? or am i missing where there’s a space?
2017-07-27T13:18:35.634235
Sade
pythondev_help_Sade_2017-07-27T13:18:35.634235
1,501,161,515.634235
87,572
pythondev
help
shouldn’t it be `replication:`
2017-07-27T13:18:40.637174
Winnifred
pythondev_help_Winnifred_2017-07-27T13:18:40.637174
1,501,161,520.637174
87,573
pythondev
help
oooooh yes
2017-07-27T13:18:43.638619
Sade
pythondev_help_Sade_2017-07-27T13:18:43.638619
1,501,161,523.638619
87,574
pythondev
help
yeah, in your second dict in the list
2017-07-27T13:18:43.638829
Meg
pythondev_help_Meg_2017-07-27T13:18:43.638829
1,501,161,523.638829
87,575
pythondev
help
thank you for the eyeballs :smile:
2017-07-27T13:18:49.642332
Sade
pythondev_help_Sade_2017-07-27T13:18:49.642332
1,501,161,529.642332
87,576
pythondev
help
should be `'replication': { ...}`
2017-07-27T13:19:00.648611
Meg
pythondev_help_Meg_2017-07-27T13:19:00.648611
1,501,161,540.648611
87,577
pythondev
help
^^
2017-07-27T13:19:06.652071
Winnifred
pythondev_help_Winnifred_2017-07-27T13:19:06.652071
1,501,161,546.652071
87,578
pythondev
help
facepalm :stuck_out_tongue:
2017-07-27T13:19:09.653571
Sade
pythondev_help_Sade_2017-07-27T13:19:09.653571
1,501,161,549.653571
87,579
pythondev
help
you have it in two locations
2017-07-27T13:19:14.655996
Meg
pythondev_help_Meg_2017-07-27T13:19:14.655996
1,501,161,554.655996
87,580
pythondev
help
both `replication` keys
2017-07-27T13:19:27.663691
Meg
pythondev_help_Meg_2017-07-27T13:19:27.663691
1,501,161,567.663691
87,581
pythondev
help
fixed!
2017-07-27T13:19:42.672242
Sade
pythondev_help_Sade_2017-07-27T13:19:42.672242
1,501,161,582.672242
87,582
pythondev
help
:boom:
2017-07-27T13:19:55.679755
Winnifred
pythondev_help_Winnifred_2017-07-27T13:19:55.679755
1,501,161,595.679755
87,583
pythondev
help
duhhhhhhhh
2017-07-27T13:20:02.683383
Sade
pythondev_help_Sade_2017-07-27T13:20:02.683383
1,501,161,602.683383
87,584
pythondev
help
sometimes its the little things
2017-07-27T13:20:26.697056
Meg
pythondev_help_Meg_2017-07-27T13:20:26.697056
1,501,161,626.697056
87,585
pythondev
help
and things like this is where using an editor or IDE helps
2017-07-27T13:20:37.703555
Meg
pythondev_help_Meg_2017-07-27T13:20:37.703555
1,501,161,637.703555
87,586
pythondev
help
because it can check your code for syntax validity as you write it
2017-07-27T13:20:48.710136
Meg
pythondev_help_Meg_2017-07-27T13:20:48.710136
1,501,161,648.710136
87,587
pythondev
help
not so much with the shell or ipython
2017-07-27T13:20:59.716053
Meg
pythondev_help_Meg_2017-07-27T13:20:59.716053
1,501,161,659.716053
87,588
pythondev
help
<@Meg> actually i use vim with syntax highlighting and it runs flake8 on everything when saving, and somehow it just decided i must be trying to do some other valid thing in python
2017-07-27T13:22:50.780251
Sade
pythondev_help_Sade_2017-07-27T13:22:50.780251
1,501,161,770.780251
87,589
pythondev
help
at least my test suite figured out it was a problem :stuck_out_tongue:
2017-07-27T13:23:02.787410
Sade
pythondev_help_Sade_2017-07-27T13:23:02.787410
1,501,161,782.78741
87,590
pythondev
help
oh, interesting
2017-07-27T13:23:31.803979
Meg
pythondev_help_Meg_2017-07-27T13:23:31.803979
1,501,161,811.803979
87,591
pythondev
help
:slightly_smiling_face:
2017-07-27T13:23:31.804544
Meg
pythondev_help_Meg_2017-07-27T13:23:31.804544
1,501,161,811.804544
87,592
pythondev
help
test suites FTW
2017-07-27T13:23:45.812061
Sade
pythondev_help_Sade_2017-07-27T13:23:45.812061
1,501,161,825.812061
87,593
pythondev
help
so flake8 said that was valid python?
2017-07-27T13:23:51.815226
Meg
pythondev_help_Meg_2017-07-27T13:23:51.815226
1,501,161,831.815226
87,594
pythondev
help
interesting
2017-07-27T13:23:52.816259
Meg
pythondev_help_Meg_2017-07-27T13:23:52.816259
1,501,161,832.816259
87,595
pythondev
help
yeah idunno what it thought i was looking for
2017-07-27T13:24:28.837075
Sade
pythondev_help_Sade_2017-07-27T13:24:28.837075
1,501,161,868.837075
87,596
pythondev
help
you may want to write a bug report about that on their gitlab
2017-07-27T13:24:30.838223
Meg
pythondev_help_Meg_2017-07-27T13:24:30.838223
1,501,161,870.838223
87,597
pythondev
help
include that dict structure as an example
2017-07-27T13:24:39.843472
Meg
pythondev_help_Meg_2017-07-27T13:24:39.843472
1,501,161,879.843472
87,598
pythondev
help
that’s not a bad idea
2017-07-27T13:24:41.844624
Sade
pythondev_help_Sade_2017-07-27T13:24:41.844624
1,501,161,881.844624
87,599
pythondev
help
worst case there really is some half valid reason for syntax like that and they close it
2017-07-27T13:24:55.852207
Sade
pythondev_help_Sade_2017-07-27T13:24:55.852207
1,501,161,895.852207
87,600
pythondev
help
yup
2017-07-27T13:25:00.855182
Meg
pythondev_help_Meg_2017-07-27T13:25:00.855182
1,501,161,900.855182
87,601
pythondev
help
don't see anything on the tracker about dictionaries that applies
2017-07-27T13:25:52.885548
Meg
pythondev_help_Meg_2017-07-27T13:25:52.885548
1,501,161,952.885548
87,602