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 | yeah and then calling sort on the list after it sorts it right? | 2019-06-06T05:55:29.316400 | Javier | pythondev_help_Javier_2019-06-06T05:55:29.316400 | 1,559,800,529.3164 | 27,121 |
pythondev | help | the line below should be sorting the entire list | 2019-06-06T05:55:42.316600 | Javier | pythondev_help_Javier_2019-06-06T05:55:42.316600 | 1,559,800,542.3166 | 27,122 |
pythondev | help | Yeah but thats only if list is [3, 2, 1], if your appending item which is str ['asd', 'ert', 'cvb'] it wouldnt, like seb said depends what `item` is | 2019-06-06T05:56:53.316800 | Rubie | pythondev_help_Rubie_2019-06-06T05:56:53.316800 | 1,559,800,613.3168 | 27,123 |
pythondev | help | Let me check that. I'm almost 100% certain that what you said is wrong because sort works based on unicode for each character | 2019-06-06T05:57:47.317000 | Javier | pythondev_help_Javier_2019-06-06T05:57:47.317000 | 1,559,800,667.317 | 27,124 |
pythondev | help | nvm | 2019-06-06T05:58:57.317200 | Javier | pythondev_help_Javier_2019-06-06T05:58:57.317200 | 1,559,800,737.3172 | 27,125 |
pythondev | help | Did that change from python 2 to python3? | 2019-06-06T05:59:05.317400 | Javier | pythondev_help_Javier_2019-06-06T05:59:05.317400 | 1,559,800,745.3174 | 27,126 |
pythondev | help | No idea sorry | 2019-06-06T05:59:39.317600 | Rubie | pythondev_help_Rubie_2019-06-06T05:59:39.317600 | 1,559,800,779.3176 | 27,127 |
pythondev | help | No one faced this kind of issues? | 2019-06-06T06:03:02.317800 | Roxie | pythondev_help_Roxie_2019-06-06T06:03:02.317800 | 1,559,800,982.3178 | 27,128 |
pythondev | help | Thanks! | 2019-06-06T06:03:08.318000 | Javier | pythondev_help_Javier_2019-06-06T06:03:08.318000 | 1,559,800,988.318 | 27,129 |
pythondev | help | What kind of result do you want? The code appends the same `item` twice, it seems a bit strange :thinking_face: | 2019-06-06T06:30:03.318300 | Ike | pythondev_help_Ike_2019-06-06T06:30:03.318300 | 1,559,802,603.3183 | 27,130 |
pythondev | help | Hello, in my Pycharm I'm working in python 3.7 environment, and trying to import `graph-tool` it is not giving any error for importing but when I run the code it gives ```/home/roaa/anaconda3/envs/PhD/lib/python2.7/site-packages/graph_tool/draw/cairo_draw.py:39: RuntimeWarning: Error importing cairo. Graph drawing will not work.
warnings.warn(msg, RuntimeWarning)``` | 2019-06-06T06:40:24.319200 | Tanja | pythondev_help_Tanja_2019-06-06T06:40:24.319200 | 1,559,803,224.3192 | 27,131 |
pythondev | help | >`lib/python2.7/`
doesn’t seem like python 3.7 :slightly_smiling_face: | 2019-06-06T06:42:35.319900 | Chester | pythondev_help_Chester_2019-06-06T06:42:35.319900 | 1,559,803,355.3199 | 27,132 |
pythondev | help | exactly, this what makes me insane how this could be like that | 2019-06-06T06:43:12.320200 | Tanja | pythondev_help_Tanja_2019-06-06T06:43:12.320200 | 1,559,803,392.3202 | 27,133 |
pythondev | help | <https://imgs.xkcd.com/comics/python_environment.png> | 2019-06-06T06:51:46.320600 | Guillermina | pythondev_help_Guillermina_2019-06-06T06:51:46.320600 | 1,559,803,906.3206 | 27,134 |
pythondev | help | I installed `cairo` and `py2cairo` it know gives this error ``` /home/roaa/anaconda3/envs/PhD/lib/python2.7/site-packages/graph_tool/draw/cairo_draw.py:1499: RuntimeWarning: Error importing Gtk module: No module named gi; GTK+ drawing will not work.
warnings.warn(msg, RuntimeWarning)
Traceback (most recent call last):
File "/home/roaa/PycharmProjects/PhD/Coding.py", line 22, in <module>
writer.writerows(A)
File "/home/roaa/.local/lib/python2.7/site-packages/scipy/sparse/base.py", line 296, in __len__
raise TypeError("sparse matrix length is ambiguous; use getnnz()"
TypeError: sparse matrix length is ambiguous; use getnnz() or shape[0]
Process finished with exit code 1
``` | 2019-06-06T06:58:16.320900 | Tanja | pythondev_help_Tanja_2019-06-06T06:58:16.320900 | 1,559,804,296.3209 | 27,135 |
pythondev | help | <@Guillermina> I approve this 100% | 2019-06-06T06:59:07.321100 | Tanja | pythondev_help_Tanja_2019-06-06T06:59:07.321100 | 1,559,804,347.3211 | 27,136 |
pythondev | help | You should post commands you used to create the virtualenv, how you installed the packages, and what code you run that doesn’t work | 2019-06-06T07:00:11.321300 | Chester | pythondev_help_Chester_2019-06-06T07:00:11.321300 | 1,559,804,411.3213 | 27,137 |
pythondev | help | ok. my code is : ```import numpy as np
import trimesh
from sklearn.neighbors import kneighbors_graph
import graph_tool.all as gt
import csv
mesh = trimesh.load("/home/roaa/Desktop/PhD/Objects/piano_tal.off")
#print(dir(mesh))
graph, _ = mesh.vertices, mesh.faces
x, y, z = zip(*graph)
xx = np.array(x)
yy = np.array(y)
zz = np.array(z)
#print(graph)
#normal_graph = normalize(Graph, norm='l2')
#print(normal_graph)
A = kneighbors_graph(graph, 20, mode='distance', include_self=True)
#print(A)
myFile = open('/home/roaa/Desktop/PhD/Objects/example2.csv', 'w')
with myFile:
writer = csv.writer(myFile)
writer.writerows(A)
#print("Writing complete")
G = gt.graph_tool.load_graph_from_csv("/home/roaa/Desktop/PhD/Objects/example2.csv")
gt.graph_draw(G)``` | 2019-06-06T07:01:53.321600 | Tanja | pythondev_help_Tanja_2019-06-06T07:01:53.321600 | 1,559,804,513.3216 | 27,138 |
pythondev | help | I'm using anaconda and install most of packages using the project interpreter, and for graph-tool I follow this way : <https://medium.com/@ronie/installing-graph-tool-for-python-3-on-anaconda-3f76d9004979> | 2019-06-06T07:04:08.321800 | Tanja | pythondev_help_Tanja_2019-06-06T07:04:08.321800 | 1,559,804,648.3218 | 27,139 |
pythondev | help | <@Javier> as <@Ike> said, you're adding each item twice. But, in addition to that, if each `item` isn't just an int, float, or string, you'll likely have to provide a custom sorting key, which is just a function that takes an individual item, and returns the value you want it to be sorted by | 2019-06-06T07:45:39.322100 | Ashley | pythondev_help_Ashley_2019-06-06T07:45:39.322100 | 1,559,807,139.3221 | 27,140 |
pythondev | help | <@Roxie> you'd have to give us more context, but the error tells you a likely reason for your problem. | 2019-06-06T09:18:17.323600 | Ashley | pythondev_help_Ashley_2019-06-06T09:18:17.323600 | 1,559,812,697.3236 | 27,141 |
pythondev | help | But my credentials looks valid I can able to scrape 20 videos | 2019-06-06T09:25:01.324100 | Roxie | pythondev_help_Roxie_2019-06-06T09:25:01.324100 | 1,559,813,101.3241 | 27,142 |
pythondev | help | If the replies are not enabled from there I'm getting an issue? | 2019-06-06T09:25:44.324700 | Roxie | pythondev_help_Roxie_2019-06-06T09:25:44.324700 | 1,559,813,144.3247 | 27,143 |
pythondev | help | Read the error carefully | 2019-06-06T09:50:34.325600 | Ashley | pythondev_help_Ashley_2019-06-06T09:50:34.325600 | 1,559,814,634.3256 | 27,144 |
pythondev | help | Does it mention anything about credentials or authentication? | 2019-06-06T09:51:23.326100 | Ashley | pythondev_help_Ashley_2019-06-06T09:51:23.326100 | 1,559,814,683.3261 | 27,145 |
pythondev | help | Sorry I mean comment threads properties
results = youtube.commentThreads().list(
part="id,snippet",
maxResults=100,
order='time',
videoId=videoid,
).execute()
This is my commentthreads snippet | 2019-06-06T09:58:19.327200 | Roxie | pythondev_help_Roxie_2019-06-06T09:58:19.327200 | 1,559,815,099.3272 | 27,146 |
pythondev | help | None | 2019-06-06T09:58:51.327400 | Roxie | pythondev_help_Roxie_2019-06-06T09:58:51.327400 | 1,559,815,131.3274 | 27,147 |
pythondev | help | there's a lot missing there | 2019-06-06T10:04:23.328100 | Ashley | pythondev_help_Ashley_2019-06-06T10:04:23.328100 | 1,559,815,463.3281 | 27,148 |
pythondev | help | is that the whole `for` loop? | 2019-06-06T10:04:35.328300 | Ashley | pythondev_help_Ashley_2019-06-06T10:04:35.328300 | 1,559,815,475.3283 | 27,149 |
pythondev | help | also, open up a brand new python shell and run this: | 2019-06-06T10:05:30.328800 | Ashley | pythondev_help_Ashley_2019-06-06T10:05:30.328800 | 1,559,815,530.3288 | 27,150 |
pythondev | help | ```
"commentcount" == 0
``` | 2019-06-06T10:05:40.329100 | Ashley | pythondev_help_Ashley_2019-06-06T10:05:40.329100 | 1,559,815,540.3291 | 27,151 |
pythondev | help | what does it spit out? | 2019-06-06T10:05:50.329300 | Ashley | pythondev_help_Ashley_2019-06-06T10:05:50.329300 | 1,559,815,550.3293 | 27,152 |
pythondev | help | My whole code, Here what things I'm missing and where I went wrong. Can you please help topsuggest | 2019-06-06T10:10:42.330100 | Roxie | pythondev_help_Roxie_2019-06-06T10:10:42.330100 | 1,559,815,842.3301 | 27,153 |
pythondev | help | like I said, punch that into a python shell and tell me what it spits out | 2019-06-06T10:12:05.330700 | Ashley | pythondev_help_Ashley_2019-06-06T10:12:05.330700 | 1,559,815,925.3307 | 27,154 |
pythondev | help | the snippet I posted, not your code sample | 2019-06-06T10:12:36.331000 | Ashley | pythondev_help_Ashley_2019-06-06T10:12:36.331000 | 1,559,815,956.331 | 27,155 |
pythondev | help | "commentcount" == 0
Out[26]: False | 2019-06-06T10:18:11.331200 | Roxie | pythondev_help_Roxie_2019-06-06T10:18:11.331200 | 1,559,816,291.3312 | 27,156 |
pythondev | help | This is what I'm getting | 2019-06-06T10:18:21.331500 | Roxie | pythondev_help_Roxie_2019-06-06T10:18:21.331500 | 1,559,816,301.3315 | 27,157 |
pythondev | help | correct, and it always will be | 2019-06-06T10:18:32.331700 | Clemmie | pythondev_help_Clemmie_2019-06-06T10:18:32.331700 | 1,559,816,312.3317 | 27,158 |
pythondev | help | you are asking if a string is equal to 0 | 2019-06-06T10:18:39.332000 | Clemmie | pythondev_help_Clemmie_2019-06-06T10:18:39.332000 | 1,559,816,319.332 | 27,159 |
pythondev | help | Ok I got now sorry commentcount ==0 | 2019-06-06T10:19:17.332700 | Roxie | pythondev_help_Roxie_2019-06-06T10:19:17.332700 | 1,559,816,357.3327 | 27,160 |
pythondev | help | i don’t think so. is commentcount your variable, or part of the `item` dictionary? | 2019-06-06T10:20:21.333300 | Clemmie | pythondev_help_Clemmie_2019-06-06T10:20:21.333300 | 1,559,816,421.3333 | 27,161 |
pythondev | help | it's a variable | 2019-06-06T10:20:58.333500 | Ashley | pythondev_help_Ashley_2019-06-06T10:20:58.333500 | 1,559,816,458.3335 | 27,162 |
pythondev | help | but there's a problem regarding that | 2019-06-06T10:21:09.333800 | Ashley | pythondev_help_Ashley_2019-06-06T10:21:09.333800 | 1,559,816,469.3338 | 27,163 |
pythondev | help | oh, ok, I see it | 2019-06-06T10:21:27.334300 | Clemmie | pythondev_help_Clemmie_2019-06-06T10:21:27.334300 | 1,559,816,487.3343 | 27,164 |
pythondev | help | <@Roxie> run this in your shell | 2019-06-06T10:21:27.334400 | Ashley | pythondev_help_Ashley_2019-06-06T10:21:27.334400 | 1,559,816,487.3344 | 27,165 |
pythondev | help | Yup its a variable | 2019-06-06T10:21:31.334700 | Roxie | pythondev_help_Roxie_2019-06-06T10:21:31.334700 | 1,559,816,491.3347 | 27,166 |
pythondev | help | Ok will do that | 2019-06-06T10:21:51.335300 | Roxie | pythondev_help_Roxie_2019-06-06T10:21:51.335300 | 1,559,816,511.3353 | 27,167 |
pythondev | help | ```
for i in range(10):
print(i)
print("done looping")
print(i)
``` | 2019-06-06T10:21:55.335500 | Ashley | pythondev_help_Ashley_2019-06-06T10:21:55.335500 | 1,559,816,515.3355 | 27,168 |
pythondev | help | notice anything odd? | 2019-06-06T10:24:04.335700 | Ashley | pythondev_help_Ashley_2019-06-06T10:24:04.335700 | 1,559,816,644.3357 | 27,169 |
pythondev | help | It running still | 2019-06-06T10:37:09.335900 | Roxie | pythondev_help_Roxie_2019-06-06T10:37:09.335900 | 1,559,817,429.3359 | 27,170 |
pythondev | help | Same issue limited no of videos is scraped | 2019-06-06T10:41:07.336500 | Roxie | pythondev_help_Roxie_2019-06-06T10:41:07.336500 | 1,559,817,667.3365 | 27,171 |
pythondev | help | I meant my snippet, not your code | 2019-06-06T10:41:12.336700 | Ashley | pythondev_help_Ashley_2019-06-06T10:41:12.336700 | 1,559,817,672.3367 | 27,172 |
pythondev | help | range? | 2019-06-06T10:41:30.337000 | Roxie | pythondev_help_Roxie_2019-06-06T10:41:30.337000 | 1,559,817,690.337 | 27,173 |
pythondev | help | yes | 2019-06-06T10:41:36.337200 | Ashley | pythondev_help_Ashley_2019-06-06T10:41:36.337200 | 1,559,817,696.3372 | 27,174 |
pythondev | help | or you can do this instead:
```
for i in [1, 2, 3]:
print(i)
print("done looping")
print(i)
``` | 2019-06-06T10:41:59.337800 | Ashley | pythondev_help_Ashley_2019-06-06T10:41:59.337800 | 1,559,817,719.3378 | 27,175 |
pythondev | help | Where I need to change my logic in my snippet? | 2019-06-06T10:43:29.338200 | Roxie | pythondev_help_Roxie_2019-06-06T10:43:29.338200 | 1,559,817,809.3382 | 27,176 |
pythondev | help | In which for loop? | 2019-06-06T10:43:35.338400 | Roxie | pythondev_help_Roxie_2019-06-06T10:43:35.338400 | 1,559,817,815.3384 | 27,177 |
pythondev | help | did you run my snippet? | 2019-06-06T10:44:31.338600 | Ashley | pythondev_help_Ashley_2019-06-06T10:44:31.338600 | 1,559,817,871.3386 | 27,178 |
pythondev | help | Yeah | 2019-06-06T10:46:05.338800 | Roxie | pythondev_help_Roxie_2019-06-06T10:46:05.338800 | 1,559,817,965.3388 | 27,179 |
pythondev | help | 1
2
3
done looping
3 | 2019-06-06T10:46:07.339000 | Roxie | pythondev_help_Roxie_2019-06-06T10:46:07.339000 | 1,559,817,967.339 | 27,180 |
pythondev | help | Hi, Everyone I'm trying to execute a python script in Jenkins from powershell console, having issues to fail Jenkins job if it throws exception. Does anyone have idea if this is an issue with powershell console or any other | 2019-06-06T10:46:28.339100 | Bao | pythondev_help_Bao_2019-06-06T10:46:28.339100 | 1,559,817,988.3391 | 27,181 |
pythondev | help | you want it to fail, or it is failing and you don’t want it to? | 2019-06-06T10:47:43.339900 | Clemmie | pythondev_help_Clemmie_2019-06-06T10:47:43.339900 | 1,559,818,063.3399 | 27,182 |
pythondev | help | and please show real code if you can. often the problem is in the `if condition` part | 2019-06-06T10:48:18.340700 | Clemmie | pythondev_help_Clemmie_2019-06-06T10:48:18.340700 | 1,559,818,098.3407 | 27,183 |
pythondev | help | not sure I understand what you expect it to do here | 2019-06-06T10:49:23.341000 | Carlo | pythondev_help_Carlo_2019-06-06T10:49:23.341000 | 1,559,818,163.341 | 27,184 |
pythondev | help | I wanted to fail. python code works fine and it throws error as expected but jenkins job keep continuing without failing | 2019-06-06T10:51:52.344300 | Bao | pythondev_help_Bao_2019-06-06T10:51:52.344300 | 1,559,818,312.3443 | 27,185 |
pythondev | help | `sys.exit` should be a function call (`sys.exit()`), also it defaults to exit code `0`, which means successful execution by your shell | 2019-06-06T10:52:06.344600 | Carlo | pythondev_help_Carlo_2019-06-06T10:52:06.344600 | 1,559,818,326.3446 | 27,186 |
pythondev | help | `sys.exit()` exits gracefully | 2019-06-06T10:52:17.345300 | Clemmie | pythondev_help_Clemmie_2019-06-06T10:52:17.345300 | 1,559,818,337.3453 | 27,187 |
pythondev | help | i tried sys.exit(-1), but no luck | 2019-06-06T10:52:26.345700 | Bao | pythondev_help_Bao_2019-06-06T10:52:26.345700 | 1,559,818,346.3457 | 27,188 |
pythondev | help | `1` | 2019-06-06T10:52:32.346000 | Carlo | pythondev_help_Carlo_2019-06-06T10:52:32.346000 | 1,559,818,352.346 | 27,189 |
pythondev | help | just don’t catch the exception | 2019-06-06T10:52:35.346100 | Clemmie | pythondev_help_Clemmie_2019-06-06T10:52:35.346100 | 1,559,818,355.3461 | 27,190 |
pythondev | help | also you're using an exception for flow control here, it would definitely be clearer to do
```
if not condition:
sys.exit(1)
``` | 2019-06-06T10:53:40.348200 | Carlo | pythondev_help_Carlo_2019-06-06T10:53:40.348200 | 1,559,818,420.3482 | 27,191 |
pythondev | help | Initially i tried without catch the exception tried to fail in else with sys.exit(1) but that didn't work too | 2019-06-06T10:54:03.348300 | Bao | pythondev_help_Bao_2019-06-06T10:54:03.348300 | 1,559,818,443.3483 | 27,192 |
pythondev | help | dont use sys exit at all | 2019-06-06T10:54:20.348500 | Clemmie | pythondev_help_Clemmie_2019-06-06T10:54:20.348500 | 1,559,818,460.3485 | 27,193 |
pythondev | help | ``` | 2019-06-06T10:54:24.348700 | Clemmie | pythondev_help_Clemmie_2019-06-06T10:54:24.348700 | 1,559,818,464.3487 | 27,194 |
pythondev | help | ```
if not condition:
raise Exception()
else:
do_somethig
``` | 2019-06-06T10:54:51.349900 | Clemmie | pythondev_help_Clemmie_2019-06-06T10:54:51.349900 | 1,559,818,491.3499 | 27,195 |
pythondev | help | the exception will stop the execution | 2019-06-06T10:55:04.350600 | Clemmie | pythondev_help_Clemmie_2019-06-06T10:55:04.350600 | 1,559,818,504.3506 | 27,196 |
pythondev | help | raise didn't help, so started using sys.exit | 2019-06-06T10:55:06.350900 | Bao | pythondev_help_Bao_2019-06-06T10:55:06.350900 | 1,559,818,506.3509 | 27,197 |
pythondev | help | `sys.exit()` throws a `SystemExit` exception itself anyway lol | 2019-06-06T10:55:13.351100 | Carlo | pythondev_help_Carlo_2019-06-06T10:55:13.351100 | 1,559,818,513.3511 | 27,198 |
pythondev | help | unless you have a catch all higher up the chain, which is a problem in and of itself | 2019-06-06T10:55:23.351300 | Clemmie | pythondev_help_Clemmie_2019-06-06T10:55:23.351300 | 1,559,818,523.3513 | 27,199 |
pythondev | help | if raise didn’t cause it to fail you’ve got a bigger issue than this snippet | 2019-06-06T10:55:42.351700 | Clemmie | pythondev_help_Clemmie_2019-06-06T10:55:42.351700 | 1,559,818,542.3517 | 27,200 |
pythondev | help | also also - if this is a the testing stage of a jenkins pipeline this should all be handled by a test, and the exception would be somehow triggered by the test you wouldn’t want a system exit, you would want the test to verify an exception was raised, normally | 2019-06-06T10:58:24.353200 | Clemmie | pythondev_help_Clemmie_2019-06-06T10:58:24.353200 | 1,559,818,704.3532 | 27,201 |
pythondev | help | <@Ashley> Any suggestion for my issue? | 2019-06-06T10:59:43.353600 | Roxie | pythondev_help_Roxie_2019-06-06T10:59:43.353600 | 1,559,818,783.3536 | 27,202 |
pythondev | help | <@Roxie> try running this in a python shell | 2019-06-06T11:00:34.353800 | Ashley | pythondev_help_Ashley_2019-06-06T11:00:34.353800 | 1,559,818,834.3538 | 27,203 |
pythondev | help | your first for loop is going to overwrite that value on every pass | 2019-06-06T11:20:00.354800 | Holly | pythondev_help_Holly_2019-06-06T11:20:00.354800 | 1,559,820,000.3548 | 27,204 |
pythondev | help | <@Holly> yes, this is an example to guide them to the reason why their code is having issues | 2019-06-06T11:25:11.355300 | Ashley | pythondev_help_Ashley_2019-06-06T11:25:11.355300 | 1,559,820,311.3553 | 27,205 |
pythondev | help | oh my bad, I must not have read back far enough | 2019-06-06T11:25:22.355600 | Holly | pythondev_help_Holly_2019-06-06T11:25:22.355600 | 1,559,820,322.3556 | 27,206 |
pythondev | help | is an array swap O(1) ? `l=[1,2]; l[0],l[1] = l[1],l[0] ` | 2019-06-06T11:40:17.357000 | Lynelle | pythondev_help_Lynelle_2019-06-06T11:40:17.357000 | 1,559,821,217.357 | 27,207 |
pythondev | help | Yes, it's just reading and writing to single list elements, so there's nothing that would scale with the length of the array. | 2019-06-06T11:43:13.358300 | Sasha | pythondev_help_Sasha_2019-06-06T11:43:13.358300 | 1,559,821,393.3583 | 27,208 |
pythondev | help | I'm looking for a #Pyqt channel | 2019-06-06T11:43:33.358900 | Porsche | pythondev_help_Porsche_2019-06-06T11:43:33.358900 | 1,559,821,413.3589 | 27,209 |
pythondev | help | we don't have such channel, there isn't much traffic about qt here. Feel free to ask question in <#C07EFMZ1N|help> or if you thing a channel should be created you can in <#CD60CDU7K|community> | 2019-06-06T11:44:49.359200 | Jimmy | pythondev_help_Jimmy_2019-06-06T11:44:49.359200 | 1,559,821,489.3592 | 27,210 |
pythondev | help | when you insert doesn't it normally shift all the elements to the right? | 2019-06-06T11:45:21.359600 | Lynelle | pythondev_help_Lynelle_2019-06-06T11:45:21.359600 | 1,559,821,521.3596 | 27,211 |
pythondev | help | I thought it might be inserting on swap | 2019-06-06T11:45:53.360500 | Lynelle | pythondev_help_Lynelle_2019-06-06T11:45:53.360500 | 1,559,821,553.3605 | 27,212 |
pythondev | help | Yes, but there's no insertion here, it's just overwriting the existing element. | 2019-06-06T11:45:56.360700 | Sasha | pythondev_help_Sasha_2019-06-06T11:45:56.360700 | 1,559,821,556.3607 | 27,213 |
pythondev | help | thank you! | 2019-06-06T11:46:07.360900 | Lynelle | pythondev_help_Lynelle_2019-06-06T11:46:07.360900 | 1,559,821,567.3609 | 27,214 |
pythondev | help | You could have done `l[3], l[4] = l[0], l[1]` too, and it would work the same, just like a regular element assignment. | 2019-06-06T11:46:56.361100 | Sasha | pythondev_help_Sasha_2019-06-06T11:46:56.361100 | 1,559,821,616.3611 | 27,215 |
pythondev | help | ```
x = 5
def f():
return x*5
def f(x):
return x*5
```
if i have a variable defined outside, should I put it explicitly in function argument or let it be like that? | 2019-06-06T12:33:24.363100 | Raguel | pythondev_help_Raguel_2019-06-06T12:33:24.363100 | 1,559,824,404.3631 | 27,216 |
pythondev | help | assuming it will be accessed by many other functions too | 2019-06-06T12:35:02.364200 | Raguel | pythondev_help_Raguel_2019-06-06T12:35:02.364200 | 1,559,824,502.3642 | 27,217 |
pythondev | help | in the second function, x is overridden by the variable requirement on the call | 2019-06-06T12:35:29.364700 | Romaine | pythondev_help_Romaine_2019-06-06T12:35:29.364700 | 1,559,824,529.3647 | 27,218 |
pythondev | help | to combine them, you need to use a different variable | 2019-06-06T12:35:44.365000 | Romaine | pythondev_help_Romaine_2019-06-06T12:35:44.365000 | 1,559,824,544.365 | 27,219 |
pythondev | help | oh yeah, forgot scoping rule here | 2019-06-06T12:36:06.365600 | Raguel | pythondev_help_Raguel_2019-06-06T12:36:06.365600 | 1,559,824,566.3656 | 27,220 |