« first day (2388 days earlier)      last day (2543 days later) » 

1:09 AM
@AndrasDeak yes, yes it does. And I was elaborating
 
"yuck, yuck in dog" ;)
 
Does [mcve] work in chat?
Hmmm... nope
 
it doesn't, and we've linked it to Sebastian a dozen times
any elaboration beyond "get your act together and come back with an MCVE" is wasted on him
 
Guess I should go to sandbox to test that kind of thing
 
I only know of [ask] and [sistersite.SE] that work here
 
1:12 AM
You should know by now that I have a bad habit of repeating myself
 
I guess I should :P
 
if it wasn't Sebastian I wouldn't mind at all, redundancy can be helpful, and I myself do this often
 
Ooo... that's a good one!
Are the shortcut links documented anywhere?
 
on main there's [edit] which is exceptionally handy
only the ones on main, I don't think the chat-compatible ones are documented, perhaps in a faq on meta
tags and meta-tags work too but that you surely know
 
1:15 AM
Cool. I just learned about the one for mcve like last week
I finally learned tag syntax a few months ago
 
1:30 AM
good night
 
 
1 hour later…
2:49 AM
is it possible to check who is downvoting every my questions on SO?
someone gave me 6 downvotes
-1
A: Update multiple records in a Model with Waterline on Mongodb

SuisseIf someone has the correct answer, don't wait. I found a workaround: The find() function can take criteria like this: var bookCriteria = [ { id: '1', status: 'pending' }, { id: '3', status: 'pending' } ] But the update() function only works with a...

and here
-1
Q: Paypal single payout: TRANSACTION_LIMIT_EXCEEDED API Error

SuisseI'm trying to make a singe payout with the REST API of PayPal with Node.js and get this error: //... "errors": { "name": "TRANSACTION_LIMIT_EXCEEDED", "message": "Either the sender or receiver exceeded the transaction limit", } //... What I do: I use this example Code: var pa...

not really constructive
someone is trolling around
 
DSM
3:05 AM
No, votes are private, even to moderators. Serial downvotes will be reversed automatically if they trigger the serial limit; beyond that it's not worth worrying about. There are lots of posts on Meta about people who have experienced similar things. Not really Python-related, though..
 
 
3 hours later…
5:57 AM
Has anybody observed a weird performance problem with taking DFT's of large 2D images (3 gigapixels) using python? OpenCV's cv2.dft is taking like 40 minutes while MATLAB does it 20x faster. I think I saw something similar with numpy(or scikit...)...
 
6:44 AM
recbg
 
 
2 hours later…
8:51 AM
HI, I am self learning programming I have learned python ,data structures and algorithms ,currently I am doing computer architecture , But I have not done any project yet can someone tell me some projects(in python) which I can do with my current knowledge ? I have some ideas but after pondering upon them I realise I need more understanding on topics to implement my project idea . I do not go to college nor do I have anyone to guide me or talk to about this .
This is the only friendly community I know and ask for help .
 
John, check this out reddit.com/r/dailyprogrammer
 
9:11 AM
@Dzjkb I checked that out but in my opinion they are fun to solve problems not project
I do these types of problems on Project euler and on competetive programming websites
 
9:26 AM
re-recbg
 
 
2 hours later…
11:26 AM
Cabbage.
 
Cabbage :-)
 
11:41 AM
It's very quiet tonight. As per usual on a Sunday. OTOH, Ned B's active: stackoverflow.com/a/43705305/4014959
 
11:59 AM
ahhah SO b0rken
tag search doesn't work
 
As Yakk said, it's probably too hard to implement something that grants different numbers of votes to tag badge holders. But if it weren't, I'd like to see the close vote threshold raised to (say) 10, but with bronze badgers getting 2 votes, silver getting 3, and gold getting 4. — PM 2Ring 3 hours ago
 
nothing would get closed
badgers are not active enough
 
ya
true dat
but then... again, almost anyone with 2k would probably have bronze in their main tag already.
and it would mean that blatant offtopic would be harder to close :D
 
hey guy...
wondering if anyone here has zeromq experience
 
we might do or do not, but also room rules:
Do not link your recent (< 1-2 days) questions in the room. The main site is the dedicated space for posting questions, and having them answered.
 
12:19 PM
Earlier tonight, I saw a Matlab -> Python translation question. We manged to convince the OP to post some Python code, though. But now there's another one, and someone who knows less Matlab than I do has tried to answer it...
 
that's not very matlabby, so a look at the matlab docs should be sufficient
 
:d
these are not functions but matrix slices
 
matlab doesn't support negative array indices
 
@AndrasDeak I already figured out that Matlab uses 1-based indices. But I don't really want to answer that question, I'm just trying to encourage the OP to improve it.
 
Plain python looks nothing like matlab - numpy does. Install numpy and see its documentation. — Antti Haapala 1 min ago
if that is "how to do this in plain python, it is too broad
if in numpy then it is ok :d
 
12:34 PM
@AnttiHaapala My apologies. I thought it might also be an interesting question to share here
You mentioned, I'm not understanding sockets?
I'm thinking perhaps it is related that tcp only seems to work for me on port 5555
 
no, I misread your question, these weren't sockets but zeromq "sockets" i guess
 
~_~ it seems that tcp only works on 5555 for me
that appears to be the problem
 
anyway you're mistaken. both sockets were bound properly, it seems.
@PascalvKooten the problem with the question is that I've read it several times over and I am not sure a) what you're asking, b) what is the erroneous behaviour that you're getting and c) how does the output represent that... etc...
ah now I guess I get it
 
12:54 PM
it was just quietly hanging
changing to a different port made it work
it's quite cool actually
I built a file system DB around it
it's faster than redis
I can do 20k writes to file system with 10k per process (2 processes)
in the same speed for redis, only a single process, can write 10k
the point is that you want a server system to just say "yes you can write"
and then have the process just write a file to system
which is much faster it appears than writing to redis
reading was even a difference of 15x
e.g. I can read a file from system 15x faster than from a redis client
thread safe file system writing :D
 
:/
webscale that is
remember: ACID... none of those letters mean "speed"
3
 
but I think it is completely safe?
there can only be 1 write at a time
thus... safety?
there is the guarantee there will only ever be 1 write at a time
and nothing can read while there is being written
and still it is 15x faster than redis in reading, and 2x faster in writing
it's all being doing to the same file
it feels huge :O
 
1:22 PM
@PM2Ring yup
matlab inherited fortran's array syntax, 1-based indices inside parentheses
 
Fair enough. FWIW, C provides the trigraph sequences ??( and ??) for ancient systems that don't have square brackets. There's also ??< and ??> as synonyms for braces. I've never seen real code using those trigraphs, only obfuscated stuff.
The mainframe machine I learned PL/I on didn't have colon or semicolon. That'd be ok on ancient Fortran, but PL/I used colon in labels (including function names, IIRC) and semicolon as a statement terminator. We had to write them as .. and ,. It seems weird at first, but you quickly get used to it.
 
yeah, I can imagine
 
2:05 PM
Cbg
 
cbg
A quick guidance
Which framework in python should i learn
 
framework? for what? :D
 
Numpy, of course.
 
for anything
 
2:21 PM
lol
 
What about django?
 
I'd still take numpy :d
 
numpy done
thanks @and
 
3:19 PM
:D
 
3:37 PM
Is anyone here experienced with Tensorflow?
 
3:55 PM
Down from 55 to 25 open pull requests for Flask! 4 more weeks until the PyCon sprint.
mitsuhiko retweeting me gets me more views in 10 minutes than 1 week.
 
Do you feel extra :| about that? ;)
 
I just need to figure out how to get that many followers without releasing entire new libraries every few years.
 
4:50 PM
@user6457870 welcome, please read our room rules: sopython.com/chatroom. In particular, please don't post recent questions.
 
Hi, thank you! I will check that =]
I see, sorry for that.
 
5:13 PM
Oh boy. So I'm trying to subtract a series from a dataframe in pandas, and it keeps throwing me these weird "you're trying to subtract numbers and strings" errors. How can I tell which column is messed up or where the error occurs? There's no way that these aren't numbers, they are generated through k-means and I'm doing k-nn
 
perhaps some of your columns are strings?
you might have to come up with an MCVE, especially since I'm not very familiar with pandas
and an actual error message
 
If I have a dataframe called df. Why if I try to multiply this df by one of his component it gives me back just full 'Nan'?
Like df = df['col1'].mul(df)
Should not give me back a new df where all the row are multiply by df['col1'] ?
 
try setting an axis for mul
odds are your dimensions are not properly aligned
 
To set up an axis for mul? Can you develop?
 
>>> df = pd.DataFrame({'a':[1,2,3], 'b':list('xyz')})
>>> df
   a  b
0  1  x
1  2  y
2  3  z
>>> df.mul(df['a'])
    a    b   0   1   2
0 NaN  NaN NaN NaN NaN
1 NaN  NaN NaN NaN NaN
2 NaN  NaN NaN NaN NaN
>>> df.mul(df['a'],axis=0)
   a    b
0  1    x
1  4   yy
2  9  zzz
 
5:25 PM
I understand, but what I am trying it to df['b'] all my df, so to have at the end
a b
0 1x xx
1 2y yy
2 3z zz
 
sorry, I don't understand
 
My fault, let me rearrange
 
you can code-format multiline messages with ctrl+k or the "fixed font" button that appears for multiline messages
 
df = pd.DataFrame({'a':[1,2,3], 'b':[4,5,6]})
I want df = df['a']*df
given back
 df = pd.DataFrame({'a':[1,4,9], 'b':[4,10,18]})
    a   b
0  1   4
1  4  10
2  9  18
when initially it was
   a  b
0  1  4
1  2  5
2  3  6
meaning, I multiplied all my matrice by the first row
 
>>> df.mul(df['a'],axis=0)
   a   b
0  1   4
1  4  10
2  9  18
>>> df['a']*df.T
   0   1   2
a  1   4   9
b  4  10  18
>>> (df['a']*df.T).T
   a   b
0  1   4
1  4  10
2  9  18
this is how the shapes are compatible
 
5:34 PM
Wow, amazing. Thats very cool, I am strugling with something like that but in a bigger scale...
 
and if you're doing array operations, you might not need pandas in the first place
>>> arr = df.values
>>> arr
array([[1, 4],
       [2, 5],
       [3, 6]])
>>> arr[:,0][:,None]*arr
array([[ 1,  4],
       [ 4, 10],
       [ 9, 18]])
:P
you probably need pandas for your complete problem, so I'm not serious
 
Hahaha, thank you very much I apreciate your help
I am trying to test your thing on my df but I am not sure it will work
 
what matters is that df['col'].shape and df.shape have to match for array broadcasting to work...
>>> df['a'].shape
(3,)
>>> df.shape
(3, 2)
those two are not compatible (leading implicit singleton dimensions are OK, trailing ones are not), so you can't just multiply them
 
:36877222
by_near
C:\Users\Mark\Anaconda3\lib\site-packages\pandas\indexes\base.py:2683: RuntimeWarning: '<' not supported
 between instances of 'int' and 'str', sort order is undefined for incomparable objects
  return this.join(other, how=how, return_indexers=return_indexers)
              sepal_length  sepal_width  petal_length  petal_width  cluster
0                      NaN          NaN           NaN          NaN      NaN
1                      NaN          NaN           NaN          NaN      NaN
Let me post the frames themselves too
 
OK, but if it's too long, consider using a paste service
and your error and printout doesn't resemble anything you've asked about except for the nans
 
5:40 PM
data
   sepal_length  sepal_width  petal_length  petal_width  cluster
0      0.222222     0.625000      0.067797     0.041667      2.0
1      0.166667     0.416667      0.067797     0.041667      0.0
2      0.111111     0.500000      0.050847     0.041667      0.0
3      0.083333     0.458333      0.084746     0.041667      0.0
4      0.194444     0.666667      0.067797     0.041667      2.0
elem
sepal_length    0.222222
sepal_width     0.625000
petal_length    0.067797
petal_width     0.041667
 
elem is not the first column of your dataframe but the first row
 
yeah, so I subtracted with axis=0
and axis=1 too, neither worked
 
(It works, you are a genious)
 
@user6457870 no worries
@AlexMitan I'm sorry, I got confused there for a sec and mistook your problem for user6457870's
let me start over
>>> df = pd.DataFrame({'a':[1,2], 'b':[3,4], 'c':[5,6]})
>>> row = df.iloc[0]
>>> df
   a  b  c
0  1  3  5
1  2  4  6
>>> row
a    1
b    3
c    5
Name: 0, dtype: int64
>>> df - row
   a  b  c
0  0  0  0
1  1  1  1
 
Yes, that seems okay
I mean that's what I want
 
5:45 PM
What is df.dtypes? Any chance that some of your data are actually strings?
>>> df = pd.DataFrame({'a':[1,2], 'b':['3','4'], 'c':[5,6]})
>>> df
   a  b  c
0  1  3  5
1  2  4  6
>>> df.dtypes
a     int64
b    object
c     int64
dtype: object
 
by_near
sepal_length    float64
sepal_width     float64
petal_length    float64
petal_width     float64
cluster           int64
dtype: object
 
So what's the actual code that's throwing your errors? I see join there, and comparison (which shouldn't play a role here).
Are you sure the subtraction goes wrong?
 
@AndrasDeak Sorry to bother you again. Is there a way to divide 2 df?
@AndrasDeak I again have just NaN. When I do df1 / df2
 
6:07 PM
.mul, .div, .sub, etc.
I should warn you though that I'm not even remotely an expert on pandas, so anything I say might be non-idiomatic or plain wrong :P
 
ok, it works when I use the columns specifically...
 
weird, perhaps the shapes are off or something
 
Hahaha, thank you Andras. You still probably better than me. Had to switch from Matlab... need time to adapt.. Btw the .div gives me back full NaN, any ideas why? Is it possible because there is a zero in my df, so division by zero just destroy everything?
Or do I need to add something like 'axis = 0 ' like last time?
 
OH JEEZ. Christ. Ok, I think I know what monumentally dumb error I got. Let me confirm
No. It works now but I don't know why it didn't before. My apologies...
 
@user6457870 well, yes. If you want to do the same thing except with div, then do the same thing except with div
@AlexMitan we'll never know;)
 
6:21 PM
I did my best to recreate the error but it just refuses to reoccur. Bad juju, methinks
 
either that, or your MCVE isn't C in some way
if it keeps reappearing, you'll have to figure out which assumption of yours is wrong concerning your data
 
cbg
 
Arg... not working.

float division by zero. I think thats because I have a zero inside. Is there a way to bypass it and make it work, giving back a Nan or something like that when it is divided by 0?
 
yeah, division by zero typically happens when you divide by zero
 
6:29 PM
I think each one of us goes through it: Hype Driven Development
 
but pandas should handle that
>>> df = pd.DataFrame({'a':[1,2,3,4], 'b':[0,5,6,7]})
>>> df
   a  b
0  1  0
1  2  5
2  3  6
3  4  7
>>> df['a']/df['b']
0         inf
1    0.400000
2    0.500000
3    0.571429
dtype: float64
same with floats
>>> df.div(df['b'],axis=0)
          a    b
0       inf  NaN
1  0.400000  1.0
2  0.500000  1.0
3  0.571429  1.0
unless your data is not float64 but object...
what are your .dtypes?
>>> df = pd.DataFrame({'a':[1,2,3,4.], 'b':[0,5,6,7.]}, dtype=object)
>>> df
   a  b
0  1  0
1  2  5
2  3  6
3  4  7
>>> df.div(df['b'],axis=0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
   [...]
  File "/usr/local/lib/python3.5/dist-packages/pandas/computation/expressions.py", line 63, in _evaluate_standard
    return op(a, b)
ZeroDivisionError: division by zero
(removed a few lines)
you should probably be working with float64/int64 data anyway
 
My data type is dtype('int32') for the denomitanor and object for numerator
 
btw @AnttiHaapala, here is the result :D github.com/kootenpv/justdb
a thread/process safe file-based database, with speed possibly faster than redis :)
 
6:48 PM
@user6457870 so cast to float before division?
>>> df.astype('float64').div(df['b'].astype('float64'),axis=0)
          a    b
0       inf  NaN
1  0.400000  1.0
2  0.500000  1.0
3  0.571429  1.0
if either one of them is of object dtype, it throws an error for me
in your case the numerator should suffice, since that's the one that's object
 
@AndrasDeak Found it. Thank yo uvery much, that was my last question. Sorry for all of these, I hope I didnt bother you too much!
 
Not at all, don't worry about it:) Feel free to ask as long as you're aware of the rules, and people will let you know whenever they're having problems with your problem
 
@AndrasDeak Sure, I am a math guy but I want to code more, it is extremely useful to have this kind of chat, I try to not abuse of it, but its tempting when you are looking for an answer...
 
Hehe, yeah, I know:) The people here will usually start telling you if you're abusing their patience, so you'd notice ;)
 
@AndrasDeak Great! Thanks!
 
7:02 PM
(the fact that you're worried for abusing the patience of others already makes you much better than those who typically abuse the patience of others :P)
 
Hahaha I know what you mean!
 
7:31 PM
Is it possible to make basic paint like program in pure python ( with out using tkinter ) ?
 
define "pure python"
 
pure python : without using external libraries
@AndrasDeak I took this word from the answer to this stackoverflow.com/questions/20587886/… question
 
> The tkinter package (“Tk interface”) is the standard Python interface to the Tk GUI toolkit.
 
@AndrasDeak Is there a way to implement without using tkinter ? because it makes the implementation very easy and I am trying to do as a project
 
I think that's the standardest you'll get with python
 
7:50 PM
Yes, it is possible.
 
8:05 PM
@davidism Can you give me some idea ?
 
The same way you'd do it with tkinter, but with a different gui instead.
 
>>> globals()
{'__builtins__': <module '__builtin__' (built-in)>, '__name__': '__main__', '__doc__': None, '__package__': None}
>>> dir(__builtins__)
['ArithmeticError',... 'xrange', 'zip']
>>> min([1,2,3])
1
>>>
Without importing __builtins__ module, I am able to access the members of __buildins__ module, like min
 
That's because, unsurprisingly, they're built in.
 
Rule is, to use any module dictionary, you import that dictionary in your current environment and access their members. So, not importing __builtins__ and being able to use the module is an exception to this rule?
 
> The Python interpreter has a number of functions and types built into it that are always available.
Literally the first line in the docs about built in functions.
 
8:11 PM
Yes it says here
 
Yes, it also says it there.
 
It's good to see you guys agree
 
>>> min([1,2,3])
1
>>> def min():
	   pass

>>>
To resolve this symbol(min), As symbol(min) is defined in __main__ module scope, it overrides __builtin__ module scope. Is that the scope rule?
 
8:32 PM
Hello
 
I don't understand the question, but builtins can be shadowed just like anything else (with the exception of reserved keywords such as True/False in python 3)
cbg
 
@johnsmith yes
 
>>> min([1,2,3])
1
>>> def min(*args): pass
...
>>> min([1,2,3])
>>> __builtins__.min([1,2,3])
1
 
you can program a pure python X client library, then you can program absolutely any windowing program for Unix that you can imagine :P
 
How can I convert in python 2.7, base64 data:image/png;base64,i... image to file image.png?
 
8:36 PM
@IsabelCariod did you google that exact question?
 
yes
with open("imageToSave.png", "wb") as fh:
    fh.write(img_data.decode('base64'))
and I dont have that decode function...
 
the answer you're using clearly defines img_data to be the bytes representing the image
you clearly have something else, and clearly there should be a clear way of going from your representation to bytes or something other appropriate
second google hit for your exact question
 
Clearly
 
>>> min([1,2,3])
1
>>> def min():
	pass

>>> def min(*args):
	print("Sham")


>>> min()
Sham
>>> min([1,2,3])
Sham
>>> # Am trying to say that, LEGB rule is shadowing `min` of `__builtins__`  module with `min` of `__main__` module
 
@overexchange is there a question here?
 
8:41 PM
You are thinking way too hard about this. The names are built in. They're still names though.
 
also note that python doesn't have polymorphism in the way that if you define both min() and min(*args) they would somehow be different entities. The second definition of min() in your example rebinds the name min from the first definition, so the function defined first is for all intents and purposes lost
a single name refers to a single object
(but several names can refer to the same object, etc.)
 
My question is, Am trying to say that, as __builtins__ module is available directly without importing it, so there exists a built-in scope rule in python, otherwise there would not be any built-in scope rule. Is that correct?
 
Yeah, I don't understand, sorry. But I'm not familiar with paradigms of other languages, which might be the reason.
you seem to be having a foreign approach to python, as far as programming languages go
That will probably trip you up very often, as python behaves pretty differently from the mainstream.
Mar 21 at 8:27, by PM 2Ring
@Drizzy In the mean time, here are a couple of articles that explain a very important difference between Python and most other languages. Other languages have "variables", Python has "names", and Facts and myths about Python names and values, which was written by SO veteran Ned Batchelder.
 
What is TypeError: Incorrect padding ?
	filename = 'some_image.png'  # I assume you have a way of picking unique filenames
	imgdata = base64.standard_b64decode(recv_image)
	with open(filename, 'wb') as f:
		f.write(imgdata)
 
@IsabelCariod one of your inputs to one of the functions is wrong
 
8:52 PM
@AndrasDeak maybe base64 string?
 
¯\_(ツ)_/¯
you're the only one who knows what you're exactly doing and which call is throwing the error
 
>>> __builtins__.min
<built-in function min>
>>> __builtins__['min']

Traceback (most recent call last):
  File "<pyshell#26>", line 1, in <module>
    __builtins__['min']
TypeError: 'module' object has no attribute '__getitem__'
>>>
 
__builtins__ is not a dict
 
I remember using dictionary syntax before, but now it does not work. Python memory model is dictionaries of dictionaries
 
Any good dupe target for stackoverflow.com/q/43711154/2301450?
 
9:00 PM
integer catching...
 
@AndrasDeak My learning is, everything is considered as an object in python and every object is a dictionary.
 
yeah, but no
a lot of things are probably dictionaries under the hood, but semantically they're not dicts and can't be accessed as dicts
specifically, a lot of things don't implement __getitem__
 
Dictionary I mean, a collection of key:value pairs
 
yes
 
@vaultah never mind, this one is close enough
 
9:07 PM
In JavaScript I had this habit of using dictionary syntax, which is making me do this in python,, sorry about that.. Now I remember it was in JavaScript
window['alert']
function alert() { [native code] }
 
python is very much not javascript:)
 
How do I view the key:value pairs of any object(say operator)? For example, globals() give me the names available in global namespace( __main__ module) as key-value pairs
 
globals() is a dict, that's why it has key-value pairs
>>> isinstance(globals(),dict)
True
>>> isinstance(__builtins__,dict)
False
>>> isinstance(min,dict)
False
 
vars(operator)?
 
9:16 PM
or dir(operator)... I'm not sure what he's going for
hehe, we can create a dict just fine
>>> fun = min
>>> {attr:fun.__getattribute__(attr) for attr in dir(fun)}
Then you can key-value pair as much as you want:P But you should not be doing anything like this when writing python.
 
I think this is what vars do
 
possible; I tried vars(min) and it threw an error on account of a missing __dict__ or something:)
>>> vars(min)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: vars() argument must have __dict__ attribute
 
oh yes
anyway, getattr(fun, attr) is cleaner
 
definitely
I don't dabble in attr-y things on my own, so forgive my ignorance:)
 
9:23 PM
So, for example, __builtins__ is not suppose to be perceived as dictionary, but as just module type instance and nothing more than that?
 
yes
 
If you try to access an attribute with [] and you get an error due to missing __getitem__, it's not a dict
(nor a list or a tuple nor...)
 
probably anything dict-ish will give you True with isinstance(obj,dict)
 
9:29 PM
ok
>>> type(__builtins__)
<type 'module'>
>>> type(min)
<type 'builtin_function_or_method'>
>>> type(globals())
<type 'dict'>
>>>
 
yes
 
For different types in python, how do I know, how to access them?
As I had dictionary in my mind(before), I was thinking of picking a member in that.. Like __abs__ member in operator
 
well, there are containers like dict and list and tuple which you know how to index; modules, functions, etc. are typically not indexable in this way, I think
they all have attributes though
note that you don't have to use double-underline special methods unless you're doing some advanced things
>>> operator.__abs__ is operator.abs
True
typically with the operator module you'd use one of its non-double-underline attributes, such as operator.abs
 
If you get some third party module(say xyz) to be used(import xyz) in your python project. How would you access that module and know more about it, before using it?
 
Read the documentation:)
look at help(xyz)
if neither are available, I guess I'd start looking at dir(xyz) but that's a pain
I'm fairly sure there are steps in between that I'm not aware of
as I noted before, I'm not very familiar with these subjects
when you start learning and using python you generally don't have to get your hands dirty for a while
 
9:45 PM
this answer has to be re-visited by me, again. See the fourth point in that answer, it says, It is the key of an entry in the current scope's dictionary. The value is sub
 
I believe they're talking about implementation
and "current scope" could refer to globals(), which is a dict
although it will first look in locals(), which is another dict
 
No, op is within a function(a_plus_abs_b_plus_const)
More than implementation, is it not the way one should visualise any type(module, function, int) instance in python?
 
oh, I didn't look at the question closely
yeah, I don't really understand what you mean/ask and I don't think I know enough to clarify it
you should wait for other, more professional inhabitants of the room
 
I mean, how will you get aware to any new third party object(module, function, ..) to use it unless you do not know that it is after all a dictionary.
 
10:21 PM
>>> def cls():
	print("\n"*100)


>>> # How does python interpret "\n" * 100. I know that python displays on stdout and return `None`
 
are you reading a python tutorial?
 
Reviewing what I learnt before.
 
Perhaps you should briefly revisit a tutorial to freshen up :)
the official tutorial is pretty good, especially since you already know how to program
 
otherwise you should be googling how string multiplication works in python
 
10:26 PM
you mean this one?
 
no, that's the documentation, and for python 2 ;)
or the same with 2 in the URL, but you really should be (re)learning python 3
 
there's some info here
I mean, about tutorials
 
Oh, Official support for Python 2 will end in 2020.
I will read Dive into python 3
@AndrasDeak Thank you. Good night
 
10:42 PM
don't mention it, good night
 
11:01 PM
@AndrasDeak Am back with one more question. After reading one and two, Is it a good idea to some python projects of some clients?
Do I need to practice anything apart from this two books?
 
Sorry, I have no idea:( I'm actually a physicist who uses python mainly as a hobby.
 

« first day (2388 days earlier)      last day (2543 days later) »