Steve D'Aprano wrote:
On Sun, 24 Sep 2017 08:18 am, Bill wrote:
All one has to do, I think, is consider (1) that passing objects by
"making copies" of them, would be prohibitively expensive
Swift passes certain values (but not others!) by value and makes a copy. That
includes many potentially
On Sun, 24 Sep 2017 08:18 am, Bill wrote:
> All one has to do, I think, is consider (1) that passing objects by
> "making copies" of them, would be prohibitively expensive
Swift passes certain values (but not others!) by value and makes a copy. That
includes many potentially large data types in
On Sun, 24 Sep 2017 07:03 am, ROGER GRAYDON CHRISTMAN wrote:
> I usually do not encourage people to optimize correctness out of their code.
+1 quote of the week :-)
--
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.
--
https://mail
On 2017-09-23 19:14, Chris Angelico wrote:
> On Sat, Sep 23, 2017 at 7:07 PM, Kryptxy
> wrote:
> > Thank you all! I opened a ticket about the same (on github).
> > I got response from most of them, and all are agreeing to the
> > change. However, one contributor did not respond at all. I tried
> >
Chris Angelico wrote:
On Sun, Sep 24, 2017 at 8:18 AM, Bill wrote:
Stephan Houben wrote:
Op 2017-09-23, Rick Johnson schreef :
These pissing contests over how values are passed in Python
are totally irrelevant. What does it matter? Nothing will be
gained or lost by arguing over which is true,
On Sun, Sep 24, 2017 at 8:18 AM, Bill wrote:
> Stephan Houben wrote:
>>
>> Op 2017-09-23, Rick Johnson schreef :
>>>
>>> These pissing contests over how values are passed in Python
>>> are totally irrelevant. What does it matter? Nothing will be
>>> gained or lost by arguing over which is true, or
Stephan Houben wrote:
Op 2017-09-23, Rick Johnson schreef :
These pissing contests over how values are passed in Python
are totally irrelevant. What does it matter? Nothing will be
gained or lost by arguing over which is true, or not. Unless
the distinction is preventing you from doing something
On 9/23/17, Stephan Houben wrote:
> Op 2017-09-22, Pavol Lisy schreef :
>> On 9/19/17, leam hall wrote:
>>> I'm working on designing the classes, sub-classes, and relationships in
>>> my
>>> code. What is a good visual way to represent it so it can be stored in
>>> git
>>> and shared on the list
On Fri, Sep 22, 2017 12:03 PM, Dennis Lee Bier wrote:>
On Fri, 22 Sep 2017 23:30:34 +1000, Steve D'Aprano
>
declaimed the following:
>
>The exercise is to demonstrate pass by reference semantics. That requires
>
>demonstrating the same semantics as the Pascal swap procedure:
>
>
>
>procedure swa
On 9/23/17 2:52 PM, Leam Hall wrote:
On 09/23/2017 02:40 PM, Terry Reedy wrote:
https://nedbatchelder.com//blog/201709/beginners_and_experts.html
Great post.
Yup. Thanks for the link. I often have that "I bet Fred> doesn't get frustrated." thing going. Nice to know Ned bangs his
head now and
On 9/23/2017 2:52 PM, Leam Hall wrote:
On 09/23/2017 02:40 PM, Terry Reedy wrote:
https://nedbatchelder.com//blog/201709/beginners_and_experts.html
Great post.
Yup. Thanks for the link. I often have that "I bet Fred> doesn't get frustrated." thing going. Nice to know Ned bangs his
head now a
On 9/22/17, Peter Otten <__pete...@web.de> wrote:
> Exposito, Pedro (RIS-MDW) wrote:
>
>> This code does a "where" clause on a panda data frame...
>>
>> Code:
>> import pandas as pd;
>> col_names = ['Name', 'Age', 'Weight', "Education"];
>> # create panda dataframe
>> x = pd.read_csv('test.dat', se
Op 2017-09-23, Rick Johnson schreef :
> These pissing contests over how values are passed in Python
> are totally irrelevant. What does it matter? Nothing will be
> gained or lost by arguing over which is true, or not. Unless
> the distinction is preventing you from doing something that
> you'd lik
On 09/23/2017 02:40 PM, Terry Reedy wrote:
https://nedbatchelder.com//blog/201709/beginners_and_experts.html
Great post.
Yup. Thanks for the link. I often have that "I bet Fred> doesn't get frustrated." thing going. Nice to know Ned bangs his
head now and again. :P
Leam
--
https://mail.p
https://nedbatchelder.com//blog/201709/beginners_and_experts.html
Great post.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list
Mark Lawrence wrote:
> [...]
> I have no interest it what the C++ does, looks like or
> anything else. All I'm bothered about is that two highly
> respected members of the Python community have stated quite
> clearly that Python is call by object. Many other people
> have stated the same in this
Hi,
if I understand the documentation of the tarfile module correctly writing
TarfileObject.add(".../path/to/filename", recursive=False)
means that the directory structure of the file object will not be included
in the archive.
In the following script only "testtext1.pdf" is s
sudo lsof -i:1080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sslocal 1795 root4u IPv4 16233 0t0 TCP localhost:socks (LISTEN)
sslocal 1795 root5u IPv4 16234 0t0 UDP localhost:socks
An app was listening on localhost:1080,it is ready for curl's so
sudo lsof -i:1080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sslocal 1795 root4u IPv4 16233 0t0 TCP localhost:socks
(LISTEN)
sslocal 1795 root5u IPv4 16234 0t0 UDP localhost:socks
An app was listening on localhost:1080,it is ready for curl's soc
On 23/09/2017 04:06, Bill wrote:
Mark Lawrence wrote:
On 22/09/2017 08:01, Bill wrote:
Steve D'Aprano wrote:
On Fri, 22 Sep 2017 02:57 pm, Bill wrote:
I find Python to be more more
like Java, with regard to "passing objects by reference".
Which is not a surprise, since both Python and Java u
Steve D'Aprano wrote:
> Paul Rubin wrote:
> > Steve D'Aprano writes:
> > > Having to spend a few hours being paid to migrate code
> > > using "print x" to "print(x)", or even a few months, is
> > > not a life-changing experience.
> >
> > Didn't someone further up the thread mention some company
>
On 09/23/2017 05:38 AM, Veek M wrote:
> I didn't understand any of that - could someone expand on that para?
> Is there a reading resource that explains the Viewport and translations? I am
> not a CS student so I did not study computer graphics.
I'm sure there are lots of things that might help.
On 09/23/2017 03:07 AM, Kryptxy via Python-list wrote:
> Thank you all! I opened a ticket about the same (on github).
> I got response from most of them, and all are agreeing to the change.
> However, one contributor did not respond at all. I tried e-mailing, but no
> response.
> Can I still proce
On 23 September 2017 at 12:37, Steve D'Aprano
wrote:
> 95% of Python is unchanged from Python 2 to 3. 95% of the remaining is a
> trivial
> renaming or other change which can be mechanically translated using a tool
> like
> 2to3. Only the remaining 5% of 5% is actually tricky to migrate. If your
On Fri, 22 Sep 2017 04:05 pm, Paul Rubin wrote:
> Steve D'Aprano writes:
>> Having to spend a few hours being paid to migrate code using "print x"
>> to "print(x)", or even a few months, is not a life-changing experience.
>
> Didn't someone further up the thread mention some company that had spe
pg 329, Rapid GUI Programming
http://storage4.static.itmages.com/i/17/0923/h_1506165624_2588733_59fdfcd4cc.png
In PyQt terminology the physical coordinate system is called the “viewport”,
and confusingly, the logical coordinate system is called the “window”.
In Figure 11.4, w
Yep. I will wait for a response. Thank you!
Original Message
On 23 Sep 2017, 16:57, Chris Angelico wrote:
> On Sat, Sep 23, 2017 at 7:44 PM, Leam Hall wrote:
>> Like Chris said, evaluate the level of effort on the code. Wait, or replace.
>> You will be happier when you take the
On Sat, 23 Sep 2017 03:01 pm, Bill wrote:
> if (20 - 10) > 15 :
> print("true")
> else:
> print("false");
print(20 - 10 > 15)
will do the job.
--
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.
--
https://mail.python.or
On Sat, Sep 23, 2017 at 7:44 PM, Leam Hall wrote:
> Like Chris said, evaluate the level of effort on the code. Wait, or replace.
> You will be happier when you take the honorable path.
Remembering that that, of course, is Plan B; plan A is to keep trying
to contact that last contributor.. S/he ha
On 09/23/2017 05:14 AM, Chris Angelico wrote:
On Sat, Sep 23, 2017 at 7:07 PM, Kryptxy wrote:
Thank you all! I opened a ticket about the same (on github).
I got response from most of them, and all are agreeing to the change.
However, one contributor did not respond at all. I tried e-mailing, bu
On Sat, Sep 23, 2017 at 7:07 PM, Kryptxy wrote:
> Thank you all! I opened a ticket about the same (on github).
> I got response from most of them, and all are agreeing to the change.
> However, one contributor did not respond at all. I tried e-mailing, but no
> response.
> Can I still proceed chan
Thank you all! I opened a ticket about the same (on github).
I got response from most of them, and all are agreeing to the change.
However, one contributor did not respond at all. I tried e-mailing, but no
response.
Can I still proceed changing the licence? It has been more than a week since
the
Chris Warrick wrote:
This outputs "False is false", because you used the variable in your
expression. You can just do this:
print("s is", s)
This will print "s is False".
Ah, good point! But I do like "self-documenting" output (so I don't
mind seeing s)---if you had 5 or more statements a
Bill wrote:
validationma...@gmail.com wrote:
i have a code in python to search and replace what i need though is
to replace the first say 10 instances of the number 1 with 2 and the
second 10 instances with the number 3. anybody knows how to do that?
Do you mean the (integer) number 1 or the ch
On 23 September 2017 at 06:46, Cai Gengyang wrote:
> Output :
>
> ('bool_one = ', False)
> ('bool_two = ', False)
> ('bool_three = ', False)
> ('bool_four = ', True)
> ('bool_five = ', False)
You’re using Python 2 with Python 3-style print statements. To make it
look good, start your code with:
Peter Otten wrote:
> validationma...@gmail.com wrote:
>
>> i have a code in python to search and replace what i need though is to
>> replace the first say 10 instances of the number 1 with 2 and the second
>> 10 instances with the number 3. anybody knows how to do that?
>>
>> fin = open(r'F:\1\x
validationma...@gmail.com wrote:
i have a code in python to search and replace what i need though is to replace
the first say 10 instances of the number 1 with 2 and the second 10 instances
with the number 3. anybody knows how to do that?
Do you mean the (integer) number 1 or the character '1'?
validationma...@gmail.com wrote:
> i have a code in python to search and replace what i need though is to
> replace the first say 10 instances of the number 1 with 2 and the second
> 10 instances with the number 3. anybody knows how to do that?
>
> fin = open(r'F:\1\xxx.txt')
> fout = open(r'F:\1
Steve D'Aprano wrote:
On Sat, 23 Sep 2017 03:01 pm, Bill wrote:
s='(20 - 10) > 15'
b=(20 - 10) > 15
print(s, " is ", ("true" if b else "false") ); ## inside parentheses
may be removed.
I am new to Python. Maybe someone here is familiar with an elegant way
to get the the value of b directly
39 matches
Mail list logo