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 | <@Keena> In python 3 a lambda doesn’t take multiple params. You need to access the params as a list, so `return sorted(dict_of_word_count.iteritems(), key=lambda v_k: (v_k[1],v_k[0]), reverse=True)[0:20]` should work I think (found at <http://cheng.logdown.com/posts/2016/11/30/python3-lambda-parameter>) | 2019-02-25T11:28:00.569800 | Clemmie | pythondev_help_Clemmie_2019-02-25T11:28:00.569800 | 1,551,094,080.5698 | 10,421 |
pythondev | help | <@Clemmie> thanks for quick reply. will look into it. is this good? --> return sorted(dict_of_word_count.iteritems(), key=lambda k_v: v_k[1], reverse=True)[0:20] | 2019-02-25T11:29:20.570500 | Keena | pythondev_help_Keena_2019-02-25T11:29:20.570500 | 1,551,094,160.5705 | 10,422 |
pythondev | help | if you want to sort on the values that should work I think, yes | 2019-02-25T11:37:56.571400 | Clemmie | pythondev_help_Clemmie_2019-02-25T11:37:56.571400 | 1,551,094,676.5714 | 10,423 |
pythondev | help | but you switch the name `v_k` and `k_v` - jsut keep that variable name consistent | 2019-02-25T11:38:35.571800 | Clemmie | pythondev_help_Clemmie_2019-02-25T11:38:35.571800 | 1,551,094,715.5718 | 10,424 |
pythondev | help | `k_v` is more correct | 2019-02-25T11:38:47.572100 | Clemmie | pythondev_help_Clemmie_2019-02-25T11:38:47.572100 | 1,551,094,727.5721 | 10,425 |
pythondev | help | actually I got that code snippet on web as lambda(v, k): (k, v), reverse=True | 2019-02-25T11:39:27.573000 | Keena | pythondev_help_Keena_2019-02-25T11:39:27.573000 | 1,551,094,767.573 | 10,426 |
pythondev | help | so I thought about doing that thing | 2019-02-25T11:39:41.573400 | Keena | pythondev_help_Keena_2019-02-25T11:39:41.573400 | 1,551,094,781.5734 | 10,427 |
pythondev | help | what do you say? | 2019-02-25T11:39:47.573700 | Keena | pythondev_help_Keena_2019-02-25T11:39:47.573700 | 1,551,094,787.5737 | 10,428 |
pythondev | help | Right, but now you are naming one variable, not multiples. Before you named them so you could sort on them in reverse (v,k -> k,v), now it is just one and you are using the list index to pick them out | 2019-02-25T11:41:01.575100 | Clemmie | pythondev_help_Clemmie_2019-02-25T11:41:01.575100 | 1,551,094,861.5751 | 10,429 |
pythondev | help | `iteritems()` gives a them as `(key, value)` so `k_v` is most internally consistent | 2019-02-25T11:41:51.576000 | Clemmie | pythondev_help_Clemmie_2019-02-25T11:41:51.576000 | 1,551,094,911.576 | 10,430 |
pythondev | help | <@Marth> Are your friends technical? Are you expecting them to run the script? Visit a webpage? The exactly workflow you want your friends to follow to get the data will help dictate what tools make the most sense. | 2019-02-25T11:42:51.576300 | Carmen | pythondev_help_Carmen_2019-02-25T11:42:51.576300 | 1,551,094,971.5763 | 10,431 |
pythondev | help | got your point. trying out the thing which you explained.thank you buddy. | 2019-02-25T11:44:39.576400 | Keena | pythondev_help_Keena_2019-02-25T11:44:39.576400 | 1,551,095,079.5764 | 10,432 |
pythondev | help | :thumbsup: | 2019-02-25T11:44:54.576600 | Clemmie | pythondev_help_Clemmie_2019-02-25T11:44:54.576600 | 1,551,095,094.5766 | 10,433 |
pythondev | help | <@Carmen> They're gamers....so while certainly computer savvy, not "technical" in the sense that I'm not expecting them to edit the script. I'm expecting them to run the script which will provide an interface. That interface is going to list their twitch clips and allow them to sort/filter and then download those clips. Currently, (as I'm told) filtering and sorting their clips is really bad....and then Twitch DOES allow them to download their clips, but it takes 3+ clicks per clip. So I'm trying to help automate that process. I'm not sure if a local .exe with gui or a webpage makes more sense. | 2019-02-25T11:56:46.583900 | Marth | pythondev_help_Marth_2019-02-25T11:56:46.583900 | 1,551,095,806.5839 | 10,434 |
pythondev | help | Well it depends if you are familiar with any of the two | 2019-02-25T11:59:41.584400 | Jimmy | pythondev_help_Jimmy_2019-02-25T11:59:41.584400 | 1,551,095,981.5844 | 10,435 |
pythondev | help | I think you could honestly use either for that. If you've got webdev experience, doing it as a webapp might be easier than learning GUI programming, but if you'd have to learn either, I'd probably argue this particular app makes more sense as a local exe with GUI. | 2019-02-25T12:01:25.585700 | Carmen | pythondev_help_Carmen_2019-02-25T12:01:25.585700 | 1,551,096,085.5857 | 10,436 |
pythondev | help | awesome. Thanks! That's helpful! <@Carmen> :taco: | 2019-02-25T12:16:26.586400 | Marth | pythondev_help_Marth_2019-02-25T12:16:26.586400 | 1,551,096,986.5864 | 10,437 |
pythondev | help | you could use something like Electron | 2019-02-25T12:17:38.586600 | Mica | pythondev_help_Mica_2019-02-25T12:17:38.586600 | 1,551,097,058.5866 | 10,438 |
pythondev | help | basically a local desktop application built with web tech | 2019-02-25T12:17:48.587000 | Mica | pythondev_help_Mica_2019-02-25T12:17:48.587000 | 1,551,097,068.587 | 10,439 |
pythondev | help | <https://www.pyinstaller.org/> is also an option, if you want to keep it mostly-Python | 2019-02-25T12:19:40.588000 | Carmen | pythondev_help_Carmen_2019-02-25T12:19:40.588000 | 1,551,097,180.588 | 10,440 |
pythondev | help | Hello all, I want to alternate capital and lowercase letters into a new array. The way I could think of to capitalize letters was breaking the original word into two arrays. I want to join them back but alternate the letters when I do so.
I keep running into the error and am stumped. If anyone could lend some advice, I would appreciate it.
if i % 2 == 0:
TypeError: not all arguments converted during string formatting | 2019-02-25T12:19:50.588200 | Leopoldo | pythondev_help_Leopoldo_2019-02-25T12:19:50.588200 | 1,551,097,190.5882 | 10,441 |
pythondev | help | Thanks <@Mica> I'll look into that as well...I'm sure I can google it, but do you happen to know what python libraries/modules I should google for that? Or is that outside of python itself? | 2019-02-25T12:20:22.588900 | Marth | pythondev_help_Marth_2019-02-25T12:20:22.588900 | 1,551,097,222.5889 | 10,442 |
pythondev | help | <@Leopoldo> `"".join(c.upper() if i % 2 else c.lower() for i, c in enumerate(word))` | 2019-02-25T12:22:11.589700 | Jonas | pythondev_help_Jonas_2019-02-25T12:22:11.589700 | 1,551,097,331.5897 | 10,443 |
pythondev | help | also the error you have given us is not the one you are experiencing, you are not doing string formatting | 2019-02-25T12:22:51.590100 | Jonas | pythondev_help_Jonas_2019-02-25T12:22:51.590100 | 1,551,097,371.5901 | 10,444 |
pythondev | help | Note that `for i in word` iterates over the characters in the string, not their index position. | 2019-02-25T12:23:57.590900 | Sasha | pythondev_help_Sasha_2019-02-25T12:23:57.590900 | 1,551,097,437.5909 | 10,445 |
pythondev | help | <@Jonas> thank you. I’ll play with that and try to understand. What does the c in enumerate(word) do? | 2019-02-25T12:25:12.591900 | Leopoldo | pythondev_help_Leopoldo_2019-02-25T12:25:12.591900 | 1,551,097,512.5919 | 10,446 |
pythondev | help | `enumerate` is a generator that for each iteration, returns a tuple of index, value | 2019-02-25T12:25:42.592600 | Hiroko | pythondev_help_Hiroko_2019-02-25T12:25:42.592600 | 1,551,097,542.5926 | 10,447 |
pythondev | help | `i` is the index of the location currently being looked at | 2019-02-25T12:26:03.593300 | Hiroko | pythondev_help_Hiroko_2019-02-25T12:26:03.593300 | 1,551,097,563.5933 | 10,448 |
pythondev | help | <@Sasha> ok so I wouldn’t need to create an array if it’s going to iterate over each character in a string? | 2019-02-25T12:26:15.593800 | Leopoldo | pythondev_help_Leopoldo_2019-02-25T12:26:15.593800 | 1,551,097,575.5938 | 10,449 |
pythondev | help | `c` is the variable name for the value at that index location | 2019-02-25T12:26:18.593900 | Hiroko | pythondev_help_Hiroko_2019-02-25T12:26:18.593900 | 1,551,097,578.5939 | 10,450 |
pythondev | help | <@Leopoldo> a string is already a list of characters | 2019-02-25T12:26:32.594400 | Clemmie | pythondev_help_Clemmie_2019-02-25T12:26:32.594400 | 1,551,097,592.5944 | 10,451 |
pythondev | help | <@Hiroko> Thank you for explaining that | 2019-02-25T12:26:42.594600 | Leopoldo | pythondev_help_Leopoldo_2019-02-25T12:26:42.594600 | 1,551,097,602.5946 | 10,452 |
pythondev | help | Well, I was more explaining why `i % 2` was giving you that error. In your code, `i` is a character, not a number. | 2019-02-25T12:27:35.595800 | Sasha | pythondev_help_Sasha_2019-02-25T12:27:35.595800 | 1,551,097,655.5958 | 10,453 |
pythondev | help | <@Clemmie> ok thanks | 2019-02-25T12:28:09.596400 | Leopoldo | pythondev_help_Leopoldo_2019-02-25T12:28:09.596400 | 1,551,097,689.5964 | 10,454 |
pythondev | help | Ok that makes sense, thank you <@Sasha> | 2019-02-25T12:28:31.596800 | Leopoldo | pythondev_help_Leopoldo_2019-02-25T12:28:31.596800 | 1,551,097,711.5968 | 10,455 |
pythondev | help | If I wanted to use i % 2, then I could combine that with say len(word) | 2019-02-25T12:28:56.597200 | Leopoldo | pythondev_help_Leopoldo_2019-02-25T12:28:56.597200 | 1,551,097,736.5972 | 10,456 |
pythondev | help | And define i = 0 | 2019-02-25T12:29:13.597400 | Leopoldo | pythondev_help_Leopoldo_2019-02-25T12:29:13.597400 | 1,551,097,753.5974 | 10,457 |
pythondev | help | Yes, you could do `for i in range(len(word))`. No need for the `i = 0`, since the `for` loop initializes it anyway. But I'd suggest you think about `enumerate` more... it's a nice elegant solution to have access to both the character and its position in your loop. | 2019-02-25T12:31:27.599200 | Sasha | pythondev_help_Sasha_2019-02-25T12:31:27.599200 | 1,551,097,887.5992 | 10,458 |
pythondev | help | Thank you for that for that @ <@Sasha>. I will do some more research. | 2019-02-25T12:32:28.599900 | Leopoldo | pythondev_help_Leopoldo_2019-02-25T12:32:28.599900 | 1,551,097,948.5999 | 10,459 |
pythondev | help | <@Marth> Electron is based on Node.js and Chromium. So there won't be Python involved at all, really. | 2019-02-25T12:37:37.600600 | Carmen | pythondev_help_Carmen_2019-02-25T12:37:37.600600 | 1,551,098,257.6006 | 10,460 |
pythondev | help | gotcha | 2019-02-25T12:38:19.600800 | Marth | pythondev_help_Marth_2019-02-25T12:38:19.600800 | 1,551,098,299.6008 | 10,461 |
pythondev | help | I don’t understand how to implement your suggestion. I’ve tried a couple of different ways but am failing so far. <@Jonas> | 2019-02-25T12:47:37.602200 | Leopoldo | pythondev_help_Leopoldo_2019-02-25T12:47:37.602200 | 1,551,098,857.6022 | 10,462 |
pythondev | help | `bird = ''.join()` | 2019-02-25T12:49:24.603100 | Candra | pythondev_help_Candra_2019-02-25T12:49:24.603100 | 1,551,098,964.6031 | 10,463 |
pythondev | help | and | 2019-02-25T12:50:05.603600 | Candra | pythondev_help_Candra_2019-02-25T12:50:05.603600 | 1,551,099,005.6036 | 10,464 |
pythondev | help | also | 2019-02-25T12:50:06.603800 | Candra | pythondev_help_Candra_2019-02-25T12:50:06.603800 | 1,551,099,006.6038 | 10,465 |
pythondev | help | you have it all in a for loop | 2019-02-25T12:50:10.604100 | Candra | pythondev_help_Candra_2019-02-25T12:50:10.604100 | 1,551,099,010.6041 | 10,466 |
pythondev | help | <@Leopoldo> you are mixing a few different concepts that each could do it themselves and getting twisted up. The easiest way is: | 2019-02-25T12:50:38.604500 | Clemmie | pythondev_help_Clemmie_2019-02-25T12:50:38.604500 | 1,551,099,038.6045 | 10,467 |
pythondev | help | ```
def myfunc(word ='TEST'):
return "".join(c.upper() if i % 2 else c.lower() for i, c in enumerate(word))
myfunc()
``` | 2019-02-25T12:51:12.605100 | Clemmie | pythondev_help_Clemmie_2019-02-25T12:51:12.605100 | 1,551,099,072.6051 | 10,468 |
pythondev | help | None | 2019-02-25T12:51:17.605200 | Candra | pythondev_help_Candra_2019-02-25T12:51:17.605200 | 1,551,099,077.6052 | 10,469 |
pythondev | help | Thank you <@Candra> That was helpful for me | 2019-02-25T12:51:28.605700 | Leopoldo | pythondev_help_Leopoldo_2019-02-25T12:51:28.605700 | 1,551,099,088.6057 | 10,470 |
pythondev | help | Yep | 2019-02-25T12:51:31.605900 | Candra | pythondev_help_Candra_2019-02-25T12:51:31.605900 | 1,551,099,091.6059 | 10,471 |
pythondev | help | <@Clemmie> has the same thing | 2019-02-25T12:51:39.606400 | Candra | pythondev_help_Candra_2019-02-25T12:51:39.606400 | 1,551,099,099.6064 | 10,472 |
pythondev | help | :slightly_smiling_face: | 2019-02-25T12:51:40.606600 | Candra | pythondev_help_Candra_2019-02-25T12:51:40.606600 | 1,551,099,100.6066 | 10,473 |
pythondev | help | <@Clemmie> Thank you. I didn’t realize it could be done so simply. | 2019-02-25T12:51:59.607400 | Leopoldo | pythondev_help_Leopoldo_2019-02-25T12:51:59.607400 | 1,551,099,119.6074 | 10,474 |
pythondev | help | I can see my attempt was getting confusing. Now that it’s working I’ll take time to understand it a little. | 2019-02-25T12:52:40.608400 | Leopoldo | pythondev_help_Leopoldo_2019-02-25T12:52:40.608400 | 1,551,099,160.6084 | 10,475 |
pythondev | help | What does the ‘’.join() stand for? | 2019-02-25T12:53:00.609000 | Leopoldo | pythondev_help_Leopoldo_2019-02-25T12:53:00.609000 | 1,551,099,180.609 | 10,476 |
pythondev | help | That way <@Candra> and I showed uses a list comprehension in the `join` call. List comprehensions are basically for loops for free, when you want the result to be a list | 2019-02-25T12:53:19.609500 | Clemmie | pythondev_help_Clemmie_2019-02-25T12:53:19.609500 | 1,551,099,199.6095 | 10,477 |
pythondev | help | `str.join()` takes a list of strings and joins them into one string, with the str you called join on in between | 2019-02-25T12:54:08.610600 | Clemmie | pythondev_help_Clemmie_2019-02-25T12:54:08.610600 | 1,551,099,248.6106 | 10,478 |
pythondev | help | so `','.join(['1','2','3'])` would result in `"1,2,3"` | 2019-02-25T12:54:31.611500 | Clemmie | pythondev_help_Clemmie_2019-02-25T12:54:31.611500 | 1,551,099,271.6115 | 10,479 |
pythondev | help | and you did this by initiating an empty string with `''` | 2019-02-25T12:54:37.611700 | Hiroko | pythondev_help_Hiroko_2019-02-25T12:54:37.611700 | 1,551,099,277.6117 | 10,480 |
pythondev | help | which made the `join` method available, because that’s part of the string type | 2019-02-25T12:54:52.612100 | Hiroko | pythondev_help_Hiroko_2019-02-25T12:54:52.612100 | 1,551,099,292.6121 | 10,481 |
pythondev | help | Thank you both <@Clemmie> <@Hiroko> You two rock, you’ve helped me a few times before and I really appreciate your patience and explanations. | 2019-02-25T12:56:03.613100 | Leopoldo | pythondev_help_Leopoldo_2019-02-25T12:56:03.613100 | 1,551,099,363.6131 | 10,482 |
pythondev | help | I'm writing a function that takes in an input from the user and inputs that into a string. But when the user input is blank i want it to default to the word "you" However i can't get it to do that. | 2019-02-25T14:03:46.615000 | Demetrice | pythondev_help_Demetrice_2019-02-25T14:03:46.615000 | 1,551,103,426.615 | 10,483 |
pythondev | help | what have you tried? | 2019-02-25T14:06:24.615400 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:06:24.615400 | 1,551,103,584.6154 | 10,484 |
pythondev | help | Actually i think i just figured it out. This seems to be working | 2019-02-25T14:08:25.615800 | Demetrice | pythondev_help_Demetrice_2019-02-25T14:08:25.615800 | 1,551,103,705.6158 | 10,485 |
pythondev | help | I think i just needed to define Name before the if statement | 2019-02-25T14:08:36.616200 | Demetrice | pythondev_help_Demetrice_2019-02-25T14:08:36.616200 | 1,551,103,716.6162 | 10,486 |
pythondev | help | Name = input("What is your name?")
if Name == '':
Name = 'you'
def two_fer(name='you'):
return("One for %s, one for me." %Name)
print(two_fer()) | 2019-02-25T14:08:37.616400 | Demetrice | pythondev_help_Demetrice_2019-02-25T14:08:37.616400 | 1,551,103,717.6164 | 10,487 |
pythondev | help | Well, the first issue is that you are referencing two different variables `Name` != `name` | 2019-02-25T14:09:42.617200 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:09:42.617200 | 1,551,103,782.6172 | 10,488 |
pythondev | help | also, generally you don’t want to use uppercase for variable names. | 2019-02-25T14:10:19.617600 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:10:19.617600 | 1,551,103,819.6176 | 10,489 |
pythondev | help | given what you have, with me not changing variable names, you want to pass `Name` in the call to `two_fer()` and in the return you want to use the variable `name` which is scoped to the function | 2019-02-25T14:11:32.619200 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:11:32.619200 | 1,551,103,892.6192 | 10,490 |
pythondev | help | So i made some minor changes and now this does seem to do what it's supposed to | 2019-02-25T14:12:18.619700 | Demetrice | pythondev_help_Demetrice_2019-02-25T14:12:18.619700 | 1,551,103,938.6197 | 10,491 |
pythondev | help | But how can i make it better? | 2019-02-25T14:12:24.620000 | Demetrice | pythondev_help_Demetrice_2019-02-25T14:12:24.620000 | 1,551,103,944.62 | 10,492 |
pythondev | help | lets see | 2019-02-25T14:12:33.620200 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:12:33.620200 | 1,551,103,953.6202 | 10,493 |
pythondev | help | name = input("What is your name?")
if name == '':
name = 'you'
def two_fer(name='you'):
return("One for %s, one for me." %name)
print(two_fer()) | 2019-02-25T14:12:37.620400 | Demetrice | pythondev_help_Demetrice_2019-02-25T14:12:37.620400 | 1,551,103,957.6204 | 10,494 |
pythondev | help | so your scoping is still wrong - if you input “Hello” it will still print out “you” | 2019-02-25T14:13:26.621000 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:13:26.621000 | 1,551,104,006.621 | 10,495 |
pythondev | help | By scoping what line are you referring to? I thought it would only print out you if the user inputs a blank | 2019-02-25T14:14:14.621600 | Demetrice | pythondev_help_Demetrice_2019-02-25T14:14:14.621600 | 1,551,104,054.6216 | 10,496 |
pythondev | help | This passes the `name` that the user input to the method `two_fer` | 2019-02-25T14:14:21.621700 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:14:21.621700 | 1,551,104,061.6217 | 10,497 |
pythondev | help | No, because you were calling the method without a parameter, which will then used the default parameter in the method signature(`def two_fer(name='you'):`) | 2019-02-25T14:15:22.622900 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:15:22.622900 | 1,551,104,122.6229 | 10,498 |
pythondev | help | I see what you're saying | 2019-02-25T14:15:48.623200 | Demetrice | pythondev_help_Demetrice_2019-02-25T14:15:48.623200 | 1,551,104,148.6232 | 10,499 |
pythondev | help | Because i left it blank on the print statement in the bottom it would always default to the you that i put in the def statement | 2019-02-25T14:16:12.624100 | Demetrice | pythondev_help_Demetrice_2019-02-25T14:16:12.624100 | 1,551,104,172.6241 | 10,500 |
pythondev | help | I getya i getya. Thank you | 2019-02-25T14:16:26.624800 | Demetrice | pythondev_help_Demetrice_2019-02-25T14:16:26.624800 | 1,551,104,186.6248 | 10,501 |
pythondev | help | What else did i do wrong? | 2019-02-25T14:16:31.625300 | Demetrice | pythondev_help_Demetrice_2019-02-25T14:16:31.625300 | 1,551,104,191.6253 | 10,502 |
pythondev | help | You handled the blank case in your `if` logic, and the default is handling the `None` case if no parameter (or `None`) is passed to the method | 2019-02-25T14:16:34.625400 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:16:34.625400 | 1,551,104,194.6254 | 10,503 |
pythondev | help | otherwise it is fine | 2019-02-25T14:16:59.626100 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:16:59.626100 | 1,551,104,219.6261 | 10,504 |
pythondev | help | you can also do `if not name`, because `""` is falsey | 2019-02-25T14:17:28.627700 | Ashley | pythondev_help_Ashley_2019-02-25T14:17:28.627700 | 1,551,104,248.6277 | 10,505 |
pythondev | help | Gezz. Such a simple assignment. Hard to believe i was doing so much wrong. Thank you so much for the help | 2019-02-25T14:17:28.627800 | Demetrice | pythondev_help_Demetrice_2019-02-25T14:17:28.627800 | 1,551,104,248.6278 | 10,506 |
pythondev | help | If you only wanted to mutate the `name` if name is blank for the `two_fer` method you could do the check for `''` inside the method | 2019-02-25T14:17:36.628100 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:17:36.628100 | 1,551,104,256.6281 | 10,507 |
pythondev | help | <@Ashley> is correct, but be aware that a lot of things are falsey, including `0` and `False`, also the time midnight and empty iterators. Take that into account if you are using falsey checking | 2019-02-25T14:18:49.630200 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:18:49.630200 | 1,551,104,329.6302 | 10,508 |
pythondev | help | Okay. In the interest of learning i don't actually know how to use if not to check to see if a user input a value | 2019-02-25T14:19:49.631200 | Demetrice | pythondev_help_Demetrice_2019-02-25T14:19:49.631200 | 1,551,104,389.6312 | 10,509 |
pythondev | help | I'm looking up the syntax for that now | 2019-02-25T14:19:55.631500 | Demetrice | pythondev_help_Demetrice_2019-02-25T14:19:55.631500 | 1,551,104,395.6315 | 10,510 |
pythondev | help | >also the time midnight
how do you get midnight to evaluate falsey? do datetime objects representing midnight evaluate to false? | 2019-02-25T14:21:04.632700 | Cherish | pythondev_help_Cherish_2019-02-25T14:21:04.632700 | 1,551,104,464.6327 | 10,511 |
pythondev | help | None | 2019-02-25T14:22:51.632900 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:22:51.632900 | 1,551,104,571.6329 | 10,512 |
pythondev | help | Datetime objects are ok because of the date portion | 2019-02-25T14:23:46.633600 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:23:46.633600 | 1,551,104,626.6336 | 10,513 |
pythondev | help | ^ is true as of at least 3.4, there was some talk about changing it later, but I can’t find a reference if it has | 2019-02-25T14:24:32.634700 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:24:32.634700 | 1,551,104,672.6347 | 10,514 |
pythondev | help | ah ok, I always end up using datetime's so I never actually realized this^ | 2019-02-25T14:24:40.634900 | Cherish | pythondev_help_Cherish_2019-02-25T14:24:40.634900 | 1,551,104,680.6349 | 10,515 |
pythondev | help | <https://docs.python.org/2.4/lib/truth.html> here's a general list | 2019-02-25T14:25:05.635400 | Ashley | pythondev_help_Ashley_2019-02-25T14:25:05.635400 | 1,551,104,705.6354 | 10,516 |
pythondev | help | Yeah, it is one of those fun edge cases. Shows up with some regularity in new years type checks | 2019-02-25T14:25:28.635900 | Clemmie | pythondev_help_Clemmie_2019-02-25T14:25:28.635900 | 1,551,104,728.6359 | 10,517 |
pythondev | help | looks like that might have been changed actually <@Clemmie> -- I'm on 3.7.2 and not getting that behavior, although I haven't seen this mentioned in a changelog equivalent anywhere
```Python 3.7.2 (default, Feb 12 2019, 08:15:36)
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import time
>>> bool(time(0, 0))
True``` | 2019-02-25T14:45:30.637700 | Cherish | pythondev_help_Cherish_2019-02-25T14:45:30.637700 | 1,551,105,930.6377 | 10,518 |
pythondev | help | found it <https://hg.python.org/cpython/rev/89aa669dcc61> | 2019-02-25T14:46:24.637900 | Cherish | pythondev_help_Cherish_2019-02-25T14:46:24.637900 | 1,551,105,984.6379 | 10,519 |
pythondev | help | >remove the ability of datetime.time to be considered false (closes #13936) [#13936] | 2019-02-25T14:46:37.638100 | Cherish | pythondev_help_Cherish_2019-02-25T14:46:37.638100 | 1,551,105,997.6381 | 10,520 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.