Skip to content
Snippets Groups Projects
Commit 1941a563 authored by Jelle Scholtalbers's avatar Jelle Scholtalbers :flag_nl:
Browse files

add environment enabling mistake

parent 699cf6ab
No related branches found
No related tags found
1 merge request!3added another example in the notebook
%% Cell type:code id: tags:
``` python
# this can be a shortcut to assign None to multiple variables
x = y = z = None
z = 1
print(x,y,z)
```
%% Output
(None, None, 1)
%% Cell type:code id: tags:
``` python
# BAD: this is probably not what you wanted
u = i = o = []
o.append("x")
print(u,i,o)
```
%% Output
(['x'], ['x'], ['x'])
%% Cell type:code id: tags:
``` python
# BAD: the original list you pass to the method will get updated!
def my_method(mutable_list=[]):
mutable_list.append('x')
return mutable_list
# a list out of the my_method scope
a_list = ['a']
b_list = my_method(mutable_list=a_list)
# a_list get modified!
print( a_list == b_list, a_list, b_list )
```
%% Output
(True, ['a', 'x'], ['a', 'x'])
%% Cell type:code id: tags:
%% Cell type:markdown id: tags:
Whats wrong here...
```bash
conda create -n giphy python=3
conda install Flask
(..)
Package plan for installation in environment /Users/scholtal/anaconda:
(..)
The following packages will be UPDATED:
(..)
The following packages will be DOWNGRADED due to dependency conflicts:
(..)
``` python
```
Spot the missing ``source activate giphy``....
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment