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 | `python -m broadway` | 2017-07-13T15:54:41.496141 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:54:41.496141 | 1,499,961,281.496141 | 85,103 |
pythondev | help | From the module's parent directory | 2017-07-13T15:54:55.503798 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:54:55.503798 | 1,499,961,295.503798 | 85,104 |
pythondev | help | and the dirs are:
```
broadway
- __init__.py
- __main__.py
```
? | 2017-07-13T15:55:08.510830 | Beula | pythondev_help_Beula_2017-07-13T15:55:08.510830 | 1,499,961,308.51083 | 85,105 |
pythondev | help | Yep | 2017-07-13T15:55:13.513607 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:55:13.513607 | 1,499,961,313.513607 | 85,106 |
pythondev | help | python2 or 3? | 2017-07-13T15:55:26.520550 | Beula | pythondev_help_Beula_2017-07-13T15:55:26.520550 | 1,499,961,326.52055 | 85,107 |
pythondev | help | delete out your __pycache__ dirs | 2017-07-13T15:55:51.533865 | Beula | pythondev_help_Beula_2017-07-13T15:55:51.533865 | 1,499,961,351.533865 | 85,108 |
pythondev | help | Same error. :thinking_face: | 2017-07-13T15:56:24.552528 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:56:24.552528 | 1,499,961,384.552528 | 85,109 |
pythondev | help | Oh, there is a `__pycache__` at the top level too - do you have an `__init__.py` in the `backend` dir? | 2017-07-13T15:56:27.554028 | Beula | pythondev_help_Beula_2017-07-13T15:56:27.554028 | 1,499,961,387.554028 | 85,110 |
pythondev | help | That would cause it | 2017-07-13T15:56:29.555365 | Beula | pythondev_help_Beula_2017-07-13T15:56:29.555365 | 1,499,961,389.555365 | 85,111 |
pythondev | help | Oh, no but there used to be. It became my Broadway module. | 2017-07-13T15:56:52.567707 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:56:52.567707 | 1,499,961,412.567707 | 85,112 |
pythondev | help | is this pushed somewhere, or a work thing? | 2017-07-13T15:57:08.575978 | Beula | pythondev_help_Beula_2017-07-13T15:57:08.575978 | 1,499,961,428.575978 | 85,113 |
pythondev | help | I'm working on the company repo which I've cloned. The above image is from the local copy. I'm just trying to run it locally on my own PC | 2017-07-13T15:57:56.601433 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:57:56.601433 | 1,499,961,476.601433 | 85,114 |
pythondev | help | Yeah, I was just hoping to see the code to look for anything funky | 2017-07-13T15:58:12.610179 | Beula | pythondev_help_Beula_2017-07-13T15:58:12.610179 | 1,499,961,492.610179 | 85,115 |
pythondev | help | hmm | 2017-07-13T15:58:15.611798 | Beula | pythondev_help_Beula_2017-07-13T15:58:15.611798 | 1,499,961,495.611798 | 85,116 |
pythondev | help | and `pwd` has you in the `backend` directory? | 2017-07-13T15:58:36.622944 | Beula | pythondev_help_Beula_2017-07-13T15:58:36.622944 | 1,499,961,516.622944 | 85,117 |
pythondev | help | Could such a thing be cause by a circular import error? | 2017-07-13T15:58:36.623221 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:58:36.623221 | 1,499,961,516.623221 | 85,118 |
pythondev | help | Yep | 2017-07-13T15:58:50.630641 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:58:50.630641 | 1,499,961,530.630641 | 85,119 |
pythondev | help | It shouldn't, you'd probably see a circular import related error in my experience | 2017-07-13T15:58:52.631653 | Beula | pythondev_help_Beula_2017-07-13T15:58:52.631653 | 1,499,961,532.631653 | 85,120 |
pythondev | help | :thinking_face: not sure what to suggest given what I can/can't see | 2017-07-13T15:59:13.642686 | Beula | pythondev_help_Beula_2017-07-13T15:59:13.642686 | 1,499,961,553.642686 | 85,121 |
pythondev | help | what's main.py look like? just `from broadway import create_app`? | 2017-07-13T15:59:38.656370 | Beula | pythondev_help_Beula_2017-07-13T15:59:38.656370 | 1,499,961,578.65637 | 85,122 |
pythondev | help | I think it may be the broadway from the `__init__`, try changing the `import broadway.external` to `from . import external` | 2017-07-13T16:02:44.757919 | Beula | pythondev_help_Beula_2017-07-13T16:02:44.757919 | 1,499,961,764.757919 | 85,123 |
pythondev | help | external looks ok, the init otherwise looks ok and then in `__main__.py` I think the `.external` may be a problem | 2017-07-13T16:03:22.778795 | Beula | pythondev_help_Beula_2017-07-13T16:03:22.778795 | 1,499,961,802.778795 | 85,124 |
pythondev | help | Usually in this case, I would comment out pretty much everything in __init__ and make sure that imports. Then start re-adding things | 2017-07-13T16:03:51.794604 | Beula | pythondev_help_Beula_2017-07-13T16:03:51.794604 | 1,499,961,831.794604 | 85,125 |
pythondev | help | I gotta get back to work, I will check back in a bit | 2017-07-13T16:04:07.802928 | Beula | pythondev_help_Beula_2017-07-13T16:04:07.802928 | 1,499,961,847.802928 | 85,126 |
pythondev | help | So I commented out lines one by one as you said and found the problem line. It's `app.config.from_object(config)`. The way I have this set up is that I pass in `os.environ['APP_SETTINGS']` which contains the relevant configuration class (e.g. `broadway.config.DevelopmentConfig`), and it's this that's throwing the error. I've tried without `broadway` and without `broadway.` but neither of those are working. Before modulizing this I just used `config.DevelopmentConfig` which worked. | 2017-07-13T16:10:16.996120 | Thomasina | pythondev_help_Thomasina_2017-07-13T16:10:16.996120 | 1,499,962,216.99612 | 85,127 |
pythondev | help | The error is now related to config, not imports? | 2017-07-13T16:11:59.049794 | Beula | pythondev_help_Beula_2017-07-13T16:11:59.049794 | 1,499,962,319.049794 | 85,128 |
pythondev | help | No, still the same error, but if I comment out `app.config.from_object(config)` in `__init__.py` I no longer receive any errors | 2017-07-13T16:13:29.096000 | Thomasina | pythondev_help_Thomasina_2017-07-13T16:13:29.096000 | 1,499,962,409.096 | 85,129 |
pythondev | help | yeah, sounds like you just need to change how the config is resolved | 2017-07-13T16:13:53.108510 | Beula | pythondev_help_Beula_2017-07-13T16:13:53.108510 | 1,499,962,433.10851 | 85,130 |
pythondev | help | Even hard-coding it like `app.config.from_object(config.DevelopmentConfig)` produces the same error `no module named 'broadway'` even though `broadway` is not anywhere in the parameter. Again, if I comment out this line, the error disappears. :thinking_face: | 2017-07-13T16:24:15.430751 | Thomasina | pythondev_help_Thomasina_2017-07-13T16:24:15.430751 | 1,499,963,055.430751 | 85,131 |
pythondev | help | `from broadway import config, util` in `models.py` appears to have caused the problem. Specifically `config`. | 2017-07-13T16:25:51.480602 | Thomasina | pythondev_help_Thomasina_2017-07-13T16:25:51.480602 | 1,499,963,151.480602 | 85,132 |
pythondev | help | try relatives for anything other than `__main__`, `from . import config, util` | 2017-07-13T16:26:46.508987 | Beula | pythondev_help_Beula_2017-07-13T16:26:46.508987 | 1,499,963,206.508987 | 85,133 |
pythondev | help | Guess I spoke too soon. I'm not even sure what's going on now. I'm not sure if the line in `models.py` is relevant at all. I just can't get `app.config.from_object()` to work no matter what I provide it with. | 2017-07-13T16:34:36.758974 | Thomasina | pythondev_help_Thomasina_2017-07-13T16:34:36.758974 | 1,499,963,676.758974 | 85,134 |
pythondev | help | Even a raw class? | 2017-07-13T16:35:03.773318 | Beula | pythondev_help_Beula_2017-07-13T16:35:03.773318 | 1,499,963,703.773318 | 85,135 |
pythondev | help | Yep. `app.config.from_object(config.DevelopmentConfig)` causes `NameError: name 'config' is not defined` | 2017-07-13T16:36:20.813481 | Thomasina | pythondev_help_Thomasina_2017-07-13T16:36:20.813481 | 1,499,963,780.813481 | 85,136 |
pythondev | help | is config imported? | 2017-07-13T16:36:32.819597 | Beula | pythondev_help_Beula_2017-07-13T16:36:32.819597 | 1,499,963,792.819597 | 85,137 |
pythondev | help | sounds like not | 2017-07-13T16:36:40.823432 | Beula | pythondev_help_Beula_2017-07-13T16:36:40.823432 | 1,499,963,800.823432 | 85,138 |
pythondev | help | Well, I thought that was the issue, so I tried adding `import config` and now I'm back to the old error `No module named 'broadway'`, referring to `from broadway import create_app, models, util` in `__main__.py`, and if I comment out `app.config.from_object(config.DevelopmentConfig)` in `__init__.py` the error no longer occurs. | 2017-07-13T16:38:01.865209 | Thomasina | pythondev_help_Thomasina_2017-07-13T16:38:01.865209 | 1,499,963,881.865209 | 85,139 |
pythondev | help | `from . import config` is probably better | 2017-07-13T16:38:49.890479 | Beula | pythondev_help_Beula_2017-07-13T16:38:49.890479 | 1,499,963,929.890479 | 85,140 |
pythondev | help | Oh, my bad. Yes it's `from . import external, config` in `__init__.py` | 2017-07-13T16:39:20.906485 | Thomasina | pythondev_help_Thomasina_2017-07-13T16:39:20.906485 | 1,499,963,960.906485 | 85,141 |
pythondev | help | It sounds like you still have a bad import somewhere, something external or config or something like that import | 2017-07-13T16:40:10.932417 | Beula | pythondev_help_Beula_2017-07-13T16:40:10.932417 | 1,499,964,010.932417 | 85,142 |
pythondev | help | Changing `from broadway import create_app, models, util` in `__main__.py` to `from . import create_app, models, util` changes the error to `ImportError: cannot import name 'create_app'` | 2017-07-13T16:40:48.952108 | Thomasina | pythondev_help_Thomasina_2017-07-13T16:40:48.952108 | 1,499,964,048.952108 | 85,143 |
pythondev | help | yeah, because it's trying to import a module, not a function | 2017-07-13T16:45:07.087288 | Beula | pythondev_help_Beula_2017-07-13T16:45:07.087288 | 1,499,964,307.087288 | 85,144 |
pythondev | help | When should I use `from broadway` vs. `from .`? I didn't know there was a difference actually | 2017-07-13T16:52:58.330636 | Thomasina | pythondev_help_Thomasina_2017-07-13T16:52:58.330636 | 1,499,964,778.330636 | 85,145 |
pythondev | help | you _should_ be able to use `from broadway` everywhere, but I am not sure what is causing you issues ATM. the `.` is a "relative" import so it just removes any ambiguity of which package you're talking about | 2017-07-13T16:55:10.398374 | Beula | pythondev_help_Beula_2017-07-13T16:55:10.398374 | 1,499,964,910.398374 | 85,146 |
pythondev | help | But you can't do relatives in something like `__main__` because the `broadway` package isn't initted yet, or something like that | 2017-07-13T16:55:45.416749 | Beula | pythondev_help_Beula_2017-07-13T16:55:45.416749 | 1,499,964,945.416749 | 85,147 |
pythondev | help | hi guys what would b the correct the print out date with letters instead of digits as month using datetime
```
print(datetime.date.today())
2017-07-13
```
I’d like to see `2017-Jul-13` instead | 2017-07-13T17:06:57.760673 | Margareta | pythondev_help_Margareta_2017-07-13T17:06:57.760673 | 1,499,965,617.760673 | 85,148 |
pythondev | help | <https://docs.python.org/2/library/datetime.html#datetime.datetime.strftime> <@Margareta> | 2017-07-13T17:09:03.820796 | Beula | pythondev_help_Beula_2017-07-13T17:09:03.820796 | 1,499,965,743.820796 | 85,149 |
pythondev | help | `datetime.date.today().strftime('%Y-%b-%d')` | 2017-07-13T17:10:25.860293 | Minerva | pythondev_help_Minerva_2017-07-13T17:10:25.860293 | 1,499,965,825.860293 | 85,150 |
pythondev | help | thank u <@Beula> and <@Minerva> !!! | 2017-07-13T17:11:51.900628 | Margareta | pythondev_help_Margareta_2017-07-13T17:11:51.900628 | 1,499,965,911.900628 | 85,151 |
pythondev | help | I placed some `print()`s at certain points to see if things were actually executing. After running `python -m broadway` I can see... | 2017-07-13T17:12:21.914336 | Thomasina | pythondev_help_Thomasina_2017-07-13T17:12:21.914336 | 1,499,965,941.914336 | 85,152 |
pythondev | help | `created app` prints _after_ `app = create_app(os.environ['APP_SETTINGS'])` runs | 2017-07-13T17:12:44.925355 | Thomasina | pythondev_help_Thomasina_2017-07-13T17:12:44.925355 | 1,499,965,964.925355 | 85,153 |
pythondev | help | Why was there no error at the beginning? Is this behaviour normal? | 2017-07-13T17:13:03.934403 | Thomasina | pythondev_help_Thomasina_2017-07-13T17:13:03.934403 | 1,499,965,983.934403 | 85,154 |
pythondev | help | python executes as it reads | 2017-07-13T17:13:21.942848 | Beula | pythondev_help_Beula_2017-07-13T17:13:21.942848 | 1,499,966,001.942848 | 85,155 |
pythondev | help | I am kind of dumb, but in this case with flask you can do: `FLASK_APP=broadway/__main__.py FLASK_DEBUG=1 flask run` | 2017-07-13T17:14:05.963388 | Beula | pythondev_help_Beula_2017-07-13T17:14:05.963388 | 1,499,966,045.963388 | 85,156 |
pythondev | help | No need for the python -m and such (though that looks like windows, not sure how the flask CLI work sthere) | 2017-07-13T17:14:19.970192 | Beula | pythondev_help_Beula_2017-07-13T17:14:19.970192 | 1,499,966,059.970192 | 85,157 |
pythondev | help | Sorry for sending you on a chase on accident | 2017-07-13T17:14:27.973775 | Beula | pythondev_help_Beula_2017-07-13T17:14:27.973775 | 1,499,966,067.973775 | 85,158 |
pythondev | help | Oh? Was I on a chase? | 2017-07-13T17:14:57.987424 | Thomasina | pythondev_help_Thomasina_2017-07-13T17:14:57.987424 | 1,499,966,097.987424 | 85,159 |
pythondev | help | No, I meant this whole refactor with the `__main__` and such | 2017-07-13T17:15:43.009330 | Beula | pythondev_help_Beula_2017-07-13T17:15:43.009330 | 1,499,966,143.00933 | 85,160 |
pythondev | help | It's hard when I can't review the code | 2017-07-13T17:15:54.014375 | Beula | pythondev_help_Beula_2017-07-13T17:15:54.014375 | 1,499,966,154.014375 | 85,161 |
pythondev | help | o_o | 2017-07-13T17:16:13.022826 | Thomasina | pythondev_help_Thomasina_2017-07-13T17:16:13.022826 | 1,499,966,173.022826 | 85,162 |
pythondev | help | is it working? | 2017-07-13T17:16:27.029614 | Beula | pythondev_help_Beula_2017-07-13T17:16:27.029614 | 1,499,966,187.029614 | 85,163 |
pythondev | help | Yep | 2017-07-13T17:17:11.049746 | Thomasina | pythondev_help_Thomasina_2017-07-13T17:17:11.049746 | 1,499,966,231.049746 | 85,164 |
pythondev | help | :boom: | 2017-07-13T17:17:26.056778 | Beula | pythondev_help_Beula_2017-07-13T17:17:26.056778 | 1,499,966,246.056778 | 85,165 |
pythondev | help | I'm happy that it's working, but honestly I'm even more confused than before :upside_down_face: | 2017-07-13T17:17:35.060604 | Thomasina | pythondev_help_Thomasina_2017-07-13T17:17:35.060604 | 1,499,966,255.060604 | 85,166 |
pythondev | help | probably a flask devserver oddity | 2017-07-13T17:18:16.080024 | Beula | pythondev_help_Beula_2017-07-13T17:18:16.080024 | 1,499,966,296.080024 | 85,167 |
pythondev | help | Well, that never would have occurred to me. I'll have to remember that. | 2017-07-13T17:25:30.277686 | Thomasina | pythondev_help_Thomasina_2017-07-13T17:25:30.277686 | 1,499,966,730.277686 | 85,168 |
pythondev | help | sorry man | 2017-07-13T17:25:55.289072 | Beula | pythondev_help_Beula_2017-07-13T17:25:55.289072 | 1,499,966,755.289072 | 85,169 |
pythondev | help | Sorry? You solved my problem! :stuck_out_tongue: Thanks man! | 2017-07-13T17:26:07.294623 | Thomasina | pythondev_help_Thomasina_2017-07-13T17:26:07.294623 | 1,499,966,767.294623 | 85,170 |
pythondev | help | after spinning for an hour or so | 2017-07-13T17:26:16.298761 | Beula | pythondev_help_Beula_2017-07-13T17:26:16.298761 | 1,499,966,776.298761 | 85,171 |
pythondev | help | Haha, no problem. It would've taken me alone at least 6 hours. :wink: | 2017-07-13T17:26:38.308520 | Thomasina | pythondev_help_Thomasina_2017-07-13T17:26:38.308520 | 1,499,966,798.30852 | 85,172 |
pythondev | help | The only - quite odd - problem I'm having now is that all my endpoints are returning 404s. There are no Python errors reported whatsoever though. :thinking_face: I'm not sure what to make of it. I inserted some `print()`s to check everything was running in the order expected and it was. | 2017-07-13T17:27:12.323594 | Thomasina | pythondev_help_Thomasina_2017-07-13T17:27:12.323594 | 1,499,966,832.323594 | 85,173 |
pythondev | help | Can you give a sample of how you are registering your blueprints? | 2017-07-13T17:27:44.337434 | Beula | pythondev_help_Beula_2017-07-13T17:27:44.337434 | 1,499,966,864.337434 | 85,174 |
pythondev | help | Um, no blueprints :sweat_smile: | 2017-07-13T17:27:58.343483 | Thomasina | pythondev_help_Thomasina_2017-07-13T17:27:58.343483 | 1,499,966,878.343483 | 85,175 |
pythondev | help | how are you registering routes | 2017-07-13T17:28:24.355022 | Beula | pythondev_help_Beula_2017-07-13T17:28:24.355022 | 1,499,966,904.355022 | 85,176 |
pythondev | help | In __main__.py:
```...
from broadway.external import api, auth
app = create_app(os.environ['APP_SETTINGS'])
class API_Root(Resource):
def get(self):
return 'This page intentionally left blank.'
api.add_resource(API_Root, '/')``` | 2017-07-13T17:29:16.378430 | Thomasina | pythondev_help_Thomasina_2017-07-13T17:29:16.378430 | 1,499,966,956.37843 | 85,177 |
pythondev | help | (Just one of many endpoints, but I chose the simplest one) | 2017-07-13T17:29:50.393942 | Thomasina | pythondev_help_Thomasina_2017-07-13T17:29:50.393942 | 1,499,966,990.393942 | 85,178 |
pythondev | help | Changing the port number in `app.run(host='0.0.0.0', port=port)` has no effect. The server restarts on the default port. :thinking_face: | 2017-07-13T17:40:12.676353 | Thomasina | pythondev_help_Thomasina_2017-07-13T17:40:12.676353 | 1,499,967,612.676353 | 85,179 |
pythondev | help | Hey guys, have some questions for you Django users.. Im a fairly novice web developer and have started a small project with Django. I need it to have an updated list of Netflix shows and movies at all times. Since Netflix doesn't have an open API, would the most logical thing to do would be to create a scraper that gets that information from their website? I am a bit stuck on what would be the proper way to do this. Thank you for your help! | 2017-07-13T18:53:28.231291 | Patricia | pythondev_help_Patricia_2017-07-13T18:53:28.231291 | 1,499,972,008.231291 | 85,180 |
pythondev | help | That's probably your only option if there's no unofficial source either. Be sure to check that you aren't breaking their terms of service with that, however. Scraping is often times okay, but some sites explicitly forbid it - especially if intending to resell the info | 2017-07-13T18:56:45.290638 | Beula | pythondev_help_Beula_2017-07-13T18:56:45.290638 | 1,499,972,205.290638 | 85,181 |
pythondev | help | hello again, looking for help with a boto3 based script. I am getting en error
```
Traceback (most recent call last):
File "backup-to-s3.py", line 58, in <module>
upload = push_to_s3(args.bucket)
File "backup-to-s3.py", line 36, in push_to_s3
uploaded = s3.Bucket(bucket_name).upload_file(file_name)
TypeError: bucket_upload_file() takes at least 3 arguments (2 given)
```
this is code <https://gist.github.com/pleegor/ae8086286533ce33cc92095d7049dce5> | 2017-07-13T20:47:33.873932 | Margareta | pythondev_help_Margareta_2017-07-13T20:47:33.873932 | 1,499,978,853.873932 | 85,182 |
pythondev | help | it appears im missing something in `s3.Bucket(bucket_name).upload_file(file_name)` | 2017-07-13T20:48:04.880429 | Margareta | pythondev_help_Margareta_2017-07-13T20:48:04.880429 | 1,499,978,884.880429 | 85,183 |
pythondev | help | i think i sorted things out (please correct me if im wrong) upload_file requires the following: `Filename, Bucket, Key, ExtraArgs=None, Callback=None, Config=None` and key was missing | 2017-07-13T20:53:00.939804 | Margareta | pythondev_help_Margareta_2017-07-13T20:53:00.939804 | 1,499,979,180.939804 | 85,184 |
pythondev | help | anybody know how I can use jquery to target specific elements that Django automatically brings up? | 2017-07-13T22:52:47.288050 | Magdalena | pythondev_help_Magdalena_2017-07-13T22:52:47.288050 | 1,499,986,367.28805 | 85,185 |
pythondev | help | specifically I'm trying to click on a button if the Django generic form error element is visible to the user, but targeting the element directly always brings up the modal that is triggered by the button, or doesn't trigger at all if I use the visible selector | 2017-07-13T22:54:03.301044 | Magdalena | pythondev_help_Magdalena_2017-07-13T22:54:03.301044 | 1,499,986,443.301044 | 85,186 |
pythondev | help | Guys am having a problem deciding whether to use function or class base view with minimal angular or jquery for frontend | 2017-07-13T23:47:52.823942 | Graham | pythondev_help_Graham_2017-07-13T23:47:52.823942 | 1,499,989,672.823942 | 85,187 |
pythondev | help | or start with function base then refactor | 2017-07-13T23:49:30.839054 | Graham | pythondev_help_Graham_2017-07-13T23:49:30.839054 | 1,499,989,770.839054 | 85,188 |
pythondev | help | it all depends on what you like. | 2017-07-14T00:47:31.374146 | Johana | pythondev_help_Johana_2017-07-14T00:47:31.374146 | 1,499,993,251.374146 | 85,189 |
pythondev | help | i prefer to stay as close to a function as possible before creating a class. however, there are great times to use a class and really depends on the use case. if you offer up some examples or ideas of what you are trying to do maybe someone has a way they have done it before. | 2017-07-14T00:48:54.386842 | Johana | pythondev_help_Johana_2017-07-14T00:48:54.386842 | 1,499,993,334.386842 | 85,190 |
pythondev | help | i don't understand the 2nd elif condition
```
choice = int(input("Choose a number in the list: "))
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
new_list = []
for i in a:
if choice not in a:
print("Choice should be in the list.")
break
elif choice > i:
my_list.append(i)
else:
print(my_list, ",\nelements containing this list is smaller than", choice)
break
``` | 2017-07-14T00:53:46.429773 | Reina | pythondev_help_Reina_2017-07-14T00:53:46.429773 | 1,499,993,626.429773 | 85,191 |
pythondev | help | <@Reina> in `for i in a:`, i takes the value of actual elements in `a`: ie: 1, 1, 2, 3, ... , 89 | 2017-07-14T01:02:32.513058 | Deedee | pythondev_help_Deedee_2017-07-14T01:02:32.513058 | 1,499,994,152.513058 | 85,192 |
pythondev | help | that '2nd elif' is simply comparing the user's input `choice` to whatever value `i` has during that iteration. If `choice > i` (ie: user's input = choice = 10, and it is the for loop's first iteration, i will have value of 1), then append `1` to `my_list` | 2017-07-14T01:04:13.528981 | Deedee | pythondev_help_Deedee_2017-07-14T01:04:13.528981 | 1,499,994,253.528981 | 85,193 |
pythondev | help | <@Deedee>
what i understand is --> what choice we give it will be more than that i
like if i give 90 and then it will be compare 90 > i so it will append 90 in list | 2017-07-14T01:09:24.577563 | Reina | pythondev_help_Reina_2017-07-14T01:09:24.577563 | 1,499,994,564.577563 | 85,194 |
pythondev | help | that is confusing | 2017-07-14T01:09:32.578702 | Reina | pythondev_help_Reina_2017-07-14T01:09:32.578702 | 1,499,994,572.578702 | 85,195 |
pythondev | help | because else part saying other thing for same | 2017-07-14T01:09:43.580358 | Reina | pythondev_help_Reina_2017-07-14T01:09:43.580358 | 1,499,994,583.580358 | 85,196 |
pythondev | help | The program starts with a list `a` w/ values.
It asks user to input a number. Let's say user feeds program `8`.
So `choice == 8`
1st for iteration:
`i is 1` and choice is 8
Skips the first if b/c choice is in a | 2017-07-14T01:12:46.609027 | Deedee | pythondev_help_Deedee_2017-07-14T01:12:46.609027 | 1,499,994,766.609027 | 85,197 |
pythondev | help | goes to `elif choice > i:` | 2017-07-14T01:13:11.612871 | Deedee | pythondev_help_Deedee_2017-07-14T01:13:11.612871 | 1,499,994,791.612871 | 85,198 |
pythondev | help | here choice is 8, i is 1 | 2017-07-14T01:13:21.614456 | Deedee | pythondev_help_Deedee_2017-07-14T01:13:21.614456 | 1,499,994,801.614456 | 85,199 |
pythondev | help | i gets appended to `my_list` | 2017-07-14T01:13:52.619065 | Deedee | pythondev_help_Deedee_2017-07-14T01:13:52.619065 | 1,499,994,832.619065 | 85,200 |
pythondev | help | i... so 1. NOT choice | 2017-07-14T01:14:59.629633 | Deedee | pythondev_help_Deedee_2017-07-14T01:14:59.629633 | 1,499,994,899.629633 | 85,201 |
pythondev | help | <@Graham> saw you typing, wanna chime in? :slightly_smiling_face: | 2017-07-14T01:17:20.651369 | Deedee | pythondev_help_Deedee_2017-07-14T01:17:20.651369 | 1,499,995,040.651369 | 85,202 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.