Re: Pandas cat.categories.isin list, is this a bug?

2018-05-17 Thread zljubisic
Hi Matt, > (Including python-list again, for lack of a reason not to. This > conversation is still relevant and appropriate for the general Python > mailing list -- I just meant that the pydata list likely has many more > Pandas users/experts, so you're more likely to get a better answer, > faster

Re: object types, mutable or not?

2018-05-17 Thread Gregory Ewing
I don't think it's very helpful to anyone to say that "everything is an object", because "everything" is far too vague a term. (It's not even close to being true -- there are plenty of concepts in Python that are not objects.) I think I would say something like "All data that a Python program can

Re: what does := means simply?

2018-05-17 Thread Abdur-Rahmaan Janhangeer
thank you very much @steve i guess it will make py fly more than ever ! Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ On Thu, 17 May 2018, 07:57 Steven D'Aprano, < steve+comp.lang.pyt...@pearwood.info> wrote: > On Thu, 17 May 2018 05:33:38 +0400, Abdur-Rahmaan Janhangeer wrote: > >

Re: why does list's .remove() does not return an object?

2018-05-17 Thread Abdur-Rahmaan Janhangeer
if then a more convenient way might be found to naturally remove and return the list maybe it was not included as one might want to remove the list only x = [1] x.remove(1) as opposed to x = [1] x.remove(1) new_list = x i was looking for like x = [1] x.remove(1).return() ps. list is was demo

Re: syntax oddities

2018-05-17 Thread Abdur-Rahmaan Janhangeer
just a remark that people help and discuss on more issues unrelated to python Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ On Thu, 17 May 2018, 07:45 Steven D'Aprano, < steve+comp.lang.pyt...@pearwood.info> wrote: > On Thu, 17 May 2018 05:25:44 +0400, Abdur-Rahmaan Janhangeer wrote

Re: syntax oddities

2018-05-17 Thread Gregory Ewing
On Tue, 15 May 2018, 23:15 Tobiah, wrote: Why is it getattr(object, item) rather then object.getattr(item)? It's part of the design philosophy of Python that the namespace of a new user-defined class should as far as possible start off as a "blank slate", not cluttered up with a bunch of pred

Re: object types, mutable or not?

2018-05-17 Thread Anders Wegge Keller
På Wed, 16 May 2018 14:48:27 +0100 Paul Moore skrev: > C++ called that an "rvalue". And then went on to define things that > could go on the left hand side of an assignment as "lvalues". And now > we have two confusing concepts to explain - see what happens when you > let a standards committee de

Re: object types, mutable or not?

2018-05-17 Thread Chris Angelico
On Thu, May 17, 2018 at 7:16 PM, Anders Wegge Keller wrote: > På Wed, 16 May 2018 14:48:27 +0100 > Paul Moore skrev: > >> C++ called that an "rvalue". And then went on to define things that >> could go on the left hand side of an assignment as "lvalues". And now >> we have two confusing concepts

Re: why does list's .remove() does not return an object?

2018-05-17 Thread Jach Fong
Abdur-Rahmaan Janhangeer at 2018/5/17 PM 04:23 wrote: if then a more convenient way might be found to naturally remove and return the list maybe it was not included as one might want to remove the list only x = [1] x.remove(1) as opposed to x = [1] x.remove(1) new_list = x IMO, this way is

Re: Python - requests - forms - web scraping - how to deal with multi stage forms

2018-05-17 Thread GMX
https://stackoverflow.com/questions/50383210/python-requests-how-to-post-few-stages-forms   --  https://mail.python.org/mailman/listinfo/python-list  Hi,  Your post will get more traction on the email list if you try to post the actual question on the list against posting a url to an external

About: from sklearn import linear_model ModuleNotFoundError: No module named sklearn

2018-05-17 Thread Jpn Jha
Dear Team Please attached Python_PyCharm Interpreter doc and zoom it . The screen shots are explanatory. Could you please guide me step wise to resolve the Issue. I am completely new to Python. Thanks Regards Jai Prakash 7975839735 -- https://mail.python.org/mailman/listinfo/python-list

Re: what does := means simply?

2018-05-17 Thread bartc
On 17/05/2018 04:54, Steven D'Aprano wrote: On Thu, 17 May 2018 05:33:38 +0400, Abdur-Rahmaan Janhangeer wrote: what does := proposes to do? A simple example (not necessarily a GOOD example, but a SIMPLE one): print(x := 100, x+1, x*2, x**3) It's also not a good example because it assumes

Re: what does := means simply?

2018-05-17 Thread Paul Moore
On 17 May 2018 at 12:58, bartc wrote: > On 17/05/2018 04:54, Steven D'Aprano wrote: >> >> On Thu, 17 May 2018 05:33:38 +0400, Abdur-Rahmaan Janhangeer wrote: >> >>> what does := proposes to do? > >> A simple example (not necessarily a GOOD example, but a SIMPLE one): >> >> print(x := 100, x+1, x*2

Re: what does := means simply?

2018-05-17 Thread Serhiy Storchaka
17.05.18 15:07, Paul Moore пише: It's a good example, because it makes it clear that the benefits of := are at least in some cases, somewhat dependent on the fact that Python evaluates arguments left to right :-) Unless it evaluates them in other order. -- https://mail.python.org/mailman/listi

Re: what does := means simply?

2018-05-17 Thread Antoon Pardon
On 17-05-18 03:44, Chris Angelico wrote: > On Thu, May 17, 2018 at 11:33 AM, Abdur-Rahmaan Janhangeer > wrote: >> what does := proposes to do? >> >> pep572 >> > If you read the PEP, you'll find an answer to your question. > > https://www.python.org/dev/peps/pep-0572/ > > ChrisA Just wondering, bu

Re: syntax oddities

2018-05-17 Thread Grant Edwards
On 2018-05-17, Abdur-Rahmaan Janhangeer wrote: > just a remark that people help and discuss on more issues unrelated to > python [...] > On Thu, 17 May 2018, 07:45 Steven D'Aprano, < > steve+comp.lang.pyt...@pearwood.info> wrote: >> On Thu, 17 May 2018 05:25:44 +0400, Abdur-Rahmaan Janhangeer wro

Re: what does := means simply?

2018-05-17 Thread Steven D'Aprano
On Thu, 17 May 2018 12:58:43 +0100, bartc wrote: > On 17/05/2018 04:54, Steven D'Aprano wrote: >> On Thu, 17 May 2018 05:33:38 +0400, Abdur-Rahmaan Janhangeer wrote: >> >>> what does := proposes to do? > >> A simple example (not necessarily a GOOD example, but a SIMPLE one): >> >> print(x := 10

Re: what does := means simply?

2018-05-17 Thread Steven D'Aprano
On Thu, 17 May 2018 14:56:32 +0200, Antoon Pardon wrote: > On 17-05-18 03:44, Chris Angelico wrote: >> https://www.python.org/dev/peps/pep-0572/ > Just wondering, but in discussing this PEP has one considered making the > ';' into an expression too, with the value being the value of the last > e

Re: Python - requests - forms - web scraping - how to deal with multi stage forms

2018-05-17 Thread Grant Edwards
On 2018-05-17, kret...@gmail.com wrote: > https://stackoverflow.com/questions/50383210/python-requests-how-to-post-few-stages-forms Your point? -- Grant Edwards grant.b.edwardsYow! I had pancake makeup at for brunch!

Re: what does := means simply?

2018-05-17 Thread Marko Rauhamaa
Antoon Pardon : > On 17-05-18 03:44, Chris Angelico wrote: > I just ask because sometimes I have a loop that now often is written > as follows: > > while True: > a = prepare_a() > b = prepare_b() > if not condition(a, b): > break > Do other stuff > >

Re: what does := means simply?

2018-05-17 Thread Steven D'Aprano
On Thu, 17 May 2018 15:54:27 +0300, Serhiy Storchaka wrote: > 17.05.18 15:07, Paul Moore пише: >> It's a good example, because it makes it clear that the benefits of := >> are at least in some cases, somewhat dependent on the fact that Python >> evaluates arguments left to right :-) > > Unless it

Re: what does := means simply?

2018-05-17 Thread Chris Angelico
On Thu, May 17, 2018 at 11:34 PM, Steven D'Aprano wrote: > On Thu, 17 May 2018 14:56:32 +0200, Antoon Pardon wrote: > >> On 17-05-18 03:44, Chris Angelico wrote: > >>> https://www.python.org/dev/peps/pep-0572/ > >> Just wondering, but in discussing this PEP has one considered making the >> ';' int

Re: what does := means simply?

2018-05-17 Thread Chris Angelico
On Thu, May 17, 2018 at 9:58 PM, bartc wrote: > On 17/05/2018 04:54, Steven D'Aprano wrote: >> >> On Thu, 17 May 2018 05:33:38 +0400, Abdur-Rahmaan Janhangeer wrote: >> >>> what does := proposes to do? > > >> A simple example (not necessarily a GOOD example, but a SIMPLE one): >> >> print(x := 100

Request for comments: use-cases for delayed evaluation

2018-05-17 Thread Steven D'Aprano
Suppose Python had a mechanism to delay the evaluation of expressions until needed. What would you use it for? Python already does this on an ad hoc basis. For example, the "and" and "or" operators are special: and If the expression on the left is falsey, the expression on the right is

Re: what does := means simply?

2018-05-17 Thread Tobiah
On 05/16/2018 08:54 PM, Steven D'Aprano wrote: On Thu, 17 May 2018 05:33:38 +0400, Abdur-Rahmaan Janhangeer wrote: what does := proposes to do? Simply, it proposes to add a new operator := for assignment (or binding) as an expression, as an addition to the = assignment operator which operates

Re: syntax oddities

2018-05-17 Thread Tobiah
Top posting is awesome for the reader plowing through a thread in order. In that case the cruft at the bottom is only for occasional reference. Ok, I yield! I know the bottom-posting party has congress right now. On 05/17/2018 06:29 AM, Grant Edwards wrote: On 2018-05-17, Abdur-Rahmaan Janhan

Re: syntax oddities

2018-05-17 Thread Paul
Top posting saves a huge amount of useless scrolling time. Is it frowned upon on this list? On Thu, May 17, 2018, 7:26 AM Tobiah wrote: > Top posting is awesome for the reader plowing through > a thread in order. In that case the cruft at the bottom > is only for occasional reference. > > Ok,

Re: what does := means simply?

2018-05-17 Thread bartc
On 17/05/2018 14:32, Steven D'Aprano wrote: On Thu, 17 May 2018 12:58:43 +0100, bartc wrote: On 17/05/2018 04:54, Steven D'Aprano wrote: On Thu, 17 May 2018 05:33:38 +0400, Abdur-Rahmaan Janhangeer wrote: what does := proposes to do? A simple example (not necessarily a GOOD example, but a

Re: syntax oddities

2018-05-17 Thread Chris Angelico
On Fri, May 18, 2018 at 12:31 AM, Paul wrote: > Top posting saves a huge amount of useless scrolling time. Is it frowned > upon on this list? Trimming your replies saves even more. Yes, it is. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: syntax oddities

2018-05-17 Thread Paul
wrote: > > Is it frowned > > upon on this list? > > Trimming your replies saves even more. Yes, it is. > > ChrisA > - > kk. Thanks Paul > > -- https://mail.python.org/mailman/listinfo/python-list

Re: what does := means simply?

2018-05-17 Thread bartc
On 17/05/2018 15:03, Chris Angelico wrote: On Thu, May 17, 2018 at 9:58 PM, bartc wrote: On 17/05/2018 04:54, Steven D'Aprano wrote: On Thu, 17 May 2018 05:33:38 +0400, Abdur-Rahmaan Janhangeer wrote: what does := proposes to do? A simple example (not necessarily a GOOD example, but a S

Re: what does := means simply?

2018-05-17 Thread Marko Rauhamaa
bartc : > Anyway, try this: > > def showarg(x): print(x) > > def dummy(*args,**kwargs): pass > > dummy(a=showarg(1),*[showarg(2),showarg(3)]) > > This displays 2,3,1 showing that evaluation is not left to right. Nice one! Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: why does list's .remove() does not return an object?

2018-05-17 Thread Ned Batchelder
On 5/17/18 4:23 AM, Abdur-Rahmaan Janhangeer wrote: if then a more convenient way might be found to naturally remove and return the list maybe it was not included as one might want to remove the list only x = [1] x.remove(1) as opposed to x = [1] x.remove(1) new_list = x i was looking for l

Re: syntax oddities

2018-05-17 Thread Rich Shepard
On Fri, 18 May 2018, Chris Angelico wrote: Top posting saves a huge amount of useless scrolling time. Is it frowned upon on this list? Trimming your replies saves even more. Yes, it is. Allow me to add an additional reason for trimming and responding beneath each quoted section: it puts t

Re: what does := means simply?

2018-05-17 Thread Chris Angelico
On Fri, May 18, 2018 at 12:30 AM, bartc wrote: > Anyway, try this: > > def showarg(x): print(x) > > def dummy(*args,**kwargs): pass > > dummy(a=showarg(1),*[showarg(2),showarg(3)]) > > This displays 2,3,1 showing that evaluation is not left to right. > Keyword args are evaluated after

Re: why does list's .remove() does not return an object?

2018-05-17 Thread Abdur-Rahmaan Janhangeer
On Thu, 17 May 2018, 18:55 Ned Batchelder, wrote: > On 5/17/18 4:23 AM, Abdur-Rahmaan Janhangeer wrote: > > if then a more convenient way might be found to naturally remove and > return the list > > maybe it was not included as one might want to remove the list only > > x = [1] > x.remove(1) > >

Re: what does := means simply?

2018-05-17 Thread Ian Kelly
On Thu, May 17, 2018 at 9:06 AM, Chris Angelico wrote: > On Fri, May 18, 2018 at 12:30 AM, bartc wrote: >> Anyway, try this: >> >> def showarg(x): print(x) >> >> def dummy(*args,**kwargs): pass >> >> dummy(a=showarg(1),*[showarg(2),showarg(3)]) >> >> This displays 2,3,1 showing that e

Re: what does := means simply?

2018-05-17 Thread Chris Angelico
On Fri, May 18, 2018 at 1:27 AM, Ian Kelly wrote: > This raises a new issue for me w.r.t. PEP 572. The spelling of := > makes it unlikely to accidentally use in place of ==, but what about > := and = confusion? For example, say I mean to write this: > > foo(a := 42, b, c) > > but accidentally

Re: why does list's .remove() does not return an object?

2018-05-17 Thread Alexandre Brault
On 2018-05-17 11:26 AM, Abdur-Rahmaan Janhangeer wrote: > I don't understand what this would return? x? You already have x. Is it > meant to make a copy? x has been mutated, so I don't understand the benefit > of making a copy of the 1-less x. Can you elaborate on the problem you are > trying to

Re: why does list's .remove() does not return an object?

2018-05-17 Thread Abdur-Rahmaan Janhangeer
x = [0,1] x.remove(0) new_list = x instead i want in one go x = [0,1] new_list = x.remove(0) # here a way for it to return the modified list by adding a .return() maybe ? Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ On Thu, 17 May 2018, 19:54 Alexandre Brault, wrote: > > On 2018

RE: Request for comments: use-cases for delayed evaluation

2018-05-17 Thread Dan Strohl via Python-list
I could easily see using all of the examples; I run into this pretty regularly. What about something like the following (which, honestly is really a combination of other examples). If I have a function that has multiple parameters, each of which might be expensive, but it might break out ear

Re: why does list's .remove() does not return an object?

2018-05-17 Thread Ned Batchelder
On 5/17/18 11:57 AM, Abdur-Rahmaan Janhangeer wrote: x = [0,1] x.remove(0) new_list = x instead i want in one go x = [0,1] new_list = x.remove(0) # here a way for it to return the modified list by adding a .return() maybe ? There isn't a way to do that in one line.  I often find myself splitt

RE: why does list's .remove() does not return an object?

2018-05-17 Thread Dan Strohl via Python-list
On 2018-05-17 11:26 AM, Abdur-Rahmaan Janhangeer wrote: > I don't understand what this would return? x? You already have x. Is > it meant to make a copy? x has been mutated, so I don't understand the > benefit of making a copy of the 1-less x. Can you elaborate on the > problem you are trying

Re: why does list's .remove() does not return an object?

2018-05-17 Thread Ned Batchelder
On 5/17/18 12:28 PM, Dan Strohl via Python-list wrote: On 2018-05-17 11:26 AM, Abdur-Rahmaan Janhangeer wrote: I don't understand what this would return? x? You already have x. Is it meant to make a copy? x has been mutated, so I don't understand the benefit of making a copy of the 1-less x. C

Re: what does := means simply?

2018-05-17 Thread Steven D'Aprano
On Thu, 17 May 2018 15:50:17 +0100, bartc wrote: > On 17/05/2018 15:03, Chris Angelico wrote: >> On Thu, May 17, 2018 at 9:58 PM, bartc wrote: >>> On 17/05/2018 04:54, Steven D'Aprano wrote: On Thu, 17 May 2018 05:33:38 +0400, Abdur-Rahmaan Janhangeer wrote: > what does := prop

Re: what does := means simply?

2018-05-17 Thread Steven D'Aprano
On Thu, 17 May 2018 17:50:22 +0300, Marko Rauhamaa wrote: > bartc : >> Anyway, try this: >> >> def showarg(x): print(x) >> >> def dummy(*args,**kwargs): pass >> >> dummy(a=showarg(1),*[showarg(2),showarg(3)]) >> >> This displays 2,3,1 showing that evaluation is not left to right. > >

Re: what does := means simply?

2018-05-17 Thread Steven D'Aprano
On Thu, 17 May 2018 15:50:17 +0100, bartc wrote: > Of course, full-on Python code is pretty much impossible to port > anywhere else anyway. Oh, I forgot to mention... given that Python is frequently used to prototype applications before the production-ready application is written in C, C++ or J

Re: object types, mutable or not?

2018-05-17 Thread Ben Bacarisse
Anders Wegge Keller writes: > På Wed, 16 May 2018 14:48:27 +0100 > Paul Moore skrev: > >> C++ called that an "rvalue". And then went on to define things that >> could go on the left hand side of an assignment as "lvalues". And now >> we have two confusing concepts to explain - see what happens w

Re: what does := means simply?

2018-05-17 Thread Chris Angelico
On Fri, May 18, 2018 at 3:34 AM, Steven D'Aprano wrote: > On Thu, 17 May 2018 15:50:17 +0100, bartc wrote: > >> Of course, full-on Python code is pretty much impossible to port >> anywhere else anyway. > > Oh, I forgot to mention... given that Python is frequently used to > prototype applications

Package DLL or SO in wheel

2018-05-17 Thread Chris Nyland
Hello, We have several internal modules we have developed that are used mostly to read different types of data files. Most of the time the different data file formats come with some sort of DLL or SO files that gives a standard interface to read the files. Our design pattern is to create a python

Re: what does := means simply?

2018-05-17 Thread Steven D'Aprano
On Fri, 18 May 2018 03:44:25 +1000, Chris Angelico wrote: > I'm morbidly curious as to what "half-on Python code" would look like. Writing Java in Python. Or C in Python. Or Lisp in Python. Or ... -- Steve -- https://mail.python.org/mailman/listinfo/python-list

Re: what does := means simply?

2018-05-17 Thread Chris Angelico
On Fri, May 18, 2018 at 3:48 AM, Steven D'Aprano wrote: > On Fri, 18 May 2018 03:44:25 +1000, Chris Angelico wrote: > >> I'm morbidly curious as to what "half-on Python code" would look like. > > Writing Java in Python. Or C in Python. Or Lisp in Python. Or ... > Ah. I was wondering if this was m

Re: why does list's .remove() does not return an object?

2018-05-17 Thread David Stanek
On 17-May-2018 12:37, Ned Batchelder wrote: > On 5/17/18 12:28 PM, Dan Strohl via Python-list wrote: > > On 2018-05-17 11:26 AM, Abdur-Rahmaan Janhangeer wrote: > > > I don't understand what this would return? x? You already have x. Is > > > it meant to make a copy? x has been mutated, so I don't

Re: why does list's .remove() does not return an object?

2018-05-17 Thread Tobiah
On 05/17/2018 09:25 AM, Ned Batchelder wrote: On 5/17/18 11:57 AM, Abdur-Rahmaan Janhangeer wrote: x = [0,1] x.remove(0) new_list = x Just call the original list 'new_list' to begin with. new_list = [0, 1] new_list.remove(0) There you are! -- https://mail.python.org/mailman/listinfo/pyt

ANN: Wing Python IDE 6.0.12 released

2018-05-17 Thread Wingware
Hi, We've just released Wing 6.0.12 , which adds wxPython 4 as a supported matplotlib backend, fixes remote development with Python 3.7, improves PEP287 docstring formatting errors, correctly updates the Source Assistant for remote files, fixes display gli

logging date format with milliseconds and timezone

2018-05-17 Thread Skip Montanaro
It seems that the logging.Formatter class uses two formats by default to format a time, default_time_format (%Y-%m-%d %H:%M:%S) and default_msec_format (%s,%03d). The former is a format string for time.strftime (and thus can't represent fractions of a second). The latter accomplishes that, but expa

Aw: Re: why does list's .remove() does not return an object?

2018-05-17 Thread Karsten Hilbert
> On 5/17/18 11:57 AM, Abdur-Rahmaan Janhangeer wrote: > > x = [0,1] > > x.remove(0) > > new_list = x > > > > instead i want in one go > > > > x = [0,1] > > new_list = x.remove(0) # here a way for it to return the modified list by > > adding a .return() maybe ? > > There isn't a way to do that in

Re: Re: why does list's .remove() does not return an object?

2018-05-17 Thread Ian Kelly
On Thu, May 17, 2018 at 3:27 PM, Karsten Hilbert wrote: >> On 5/17/18 11:57 AM, Abdur-Rahmaan Janhangeer wrote: >> > x = [0,1] >> > x.remove(0) >> > new_list = x >> > >> > instead i want in one go >> > >> > x = [0,1] >> > new_list = x.remove(0) # here a way for it to return the modified list by >>

Aw: Re: why does list's .remove() does not return an object?

2018-05-17 Thread Karsten Hilbert
>new_list = list(x.remove(0)) >new_list = x.remove(0)[:] Please disregard :) kh -- https://mail.python.org/mailman/listinfo/python-list

file download using django and javascript

2018-05-17 Thread Xristos Xristoou
i have create a django app with REST JSON API and i fill html table in web page from my JSON. here some examples javascript snippets : var field22=document.getElementById('f22'); field22.innerHTML=e.target.feature.properties.id; var field23=document.getElementById('f23'); field23.innerHTML=e

Re: syntax oddities

2018-05-17 Thread Chris Angelico
On Fri, May 18, 2018 at 8:31 AM, Dennis Lee Bieber wrote: > On Thu, 17 May 2018 07:18:32 -0700, Tobiah declaimed the > following: > >>Top posting is awesome for the reader plowing through >>a thread in order. In that case the cruft at the bottom >>is only for occasional reference. >> > >

Re: syntax oddities

2018-05-17 Thread Paul
> > > That concept is meaningful only email between two parties, where > the > quoted material is a "courtesy copy" for content the other party likely > provided a week earlier (snail mail). > > But mailing lists/newsgroups are the equivalent of a bulletin board > open to anyone wal

Re: syntax oddities

2018-05-17 Thread Chris Angelico
On Fri, May 18, 2018 at 8:44 AM, Paul wrote: >> >> >> That concept is meaningful only email between two parties, where >> the >> quoted material is a "courtesy copy" for content the other party likely >> provided a week earlier (snail mail). >> >> But mailing lists/newsgroups are t

Re: object types, mutable or not?

2018-05-17 Thread Mike McClain
On Thu, May 17, 2018 at 07:28:44PM +1000, Chris Angelico wrote: > On Thu, May 17, 2018 at 7:16 PM, Anders Wegge Keller wrote: > > P?? Wed, 16 May 2018 14:48:27 +0100 > > Paul Moore skrev: > > > >> C++ called that an "rvalue". And then went on to define things that > >> could go on the left hand s

Re: syntax oddities

2018-05-17 Thread Steven D'Aprano
On Fri, 18 May 2018 08:38:31 +1000, Chris Angelico wrote: > On Fri, May 18, 2018 at 8:31 AM, Dennis Lee Bieber > wrote: >> On Thu, 17 May 2018 07:18:32 -0700, Tobiah declaimed >> the following: >> >>>Top posting is awesome for the reader plowing through a thread in >>>order. In that case the cr

Re: what does := means simply?

2018-05-17 Thread bartc
On 17/05/2018 18:19, Steven D'Aprano wrote: On Thu, 17 May 2018 15:50:17 +0100, bartc wrote: Of course, full-on Python code is pretty much impossible to port anywhere else anyway. *rolls eyes* Any pair of languages will have code that is hard to port from one to the other without jumping

Re: what does := means simply?

2018-05-17 Thread Steven D'Aprano
On Fri, 18 May 2018 02:17:39 +0100, bartc wrote: > Normally you'd use the source code as a start point. In the case of > Python, that means Python source code. But you will quickly run into > problems because you will often see 'import lib' and be unable to find > lib.py anywhere. Seriously? Ther

Re: why does list's .remove() does not return an object?

2018-05-17 Thread Abdur-Rahmaan Janhangeer
ah there's no return question then that precisely returned the discussion to the first answer Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ On Thu, 17 May 2018, 23:35 Tobiah, wrote: > On 05/17/2018 09:25 AM, Ned Batchelder wrote: > > On 5/17/18 11:57 AM, Abdur-Rahmaan Janhangeer w

Re: what does := means simply?

2018-05-17 Thread Ian Kelly
On Thu, May 17, 2018, 7:50 PM Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > > If you want to *really* see code that is hard to port, you should try > porting an Inform 7 program to another language. Any other language. > How about Z-code? *ducks* > -- https://mail.python.org

Re: what does := means simply?

2018-05-17 Thread Ben Finney
Steven D'Aprano writes: > If you want to *really* see code that is hard to port, you should try > porting an Inform 7 program to another language. Any other language. Does porting Inform 7 code to Inform 6 count? They are very different languages :-) -- \ “Puritanism: The haunting fear t

Re: what does := means simply?

2018-05-17 Thread Bob van der Poel
On Thu, May 17, 2018, 8:45 PM Ben Finney, wrote: > Steven D'Aprano writes: > > > If you want to *really* see code that is hard to port, you should try > > porting an Inform 7 program to another language. Any other language. > > Does porting Inform 7 code to Inform 6 count? They are very differen

Re: Request for comments: use-cases for delayed evaluation

2018-05-17 Thread dieter
Steven D'Aprano writes: > Suppose Python had a mechanism to delay the evaluation of expressions > until needed. What would you use it for? Delayed evaluation is some form of "lazy evaluation": evaluate an expression (only) at the time, it is needed (maybe for the first time). The avocates of "

Re: Package DLL or SO in wheel

2018-05-17 Thread dieter
Chris Nyland writes: > We have several internal modules we have developed that are used mostly to > read different types of data files. Most of the time the different data > file formats come with some sort of DLL or SO files that gives a standard > interface to read the files. Our design pattern

Re: syntax oddities

2018-05-17 Thread Lele Gaifax
Chris Angelico writes: > Remind me which direction text is usually written in English? This applies to italian as well, accordingly to one my signatures, that roughly corresponds to the following: Because it is contrary to the normal sense of reading > What's wrong with top-posting? >> Th