Hi,
I can't give you the advise for a concrete version anyway there are lot of
arguments given by the other posters. BUT there is a way how you can circumvent
the problem to some extend:
Are you intending to use Jenkins? I don't want to convince you here why to use
Jenkins but maybe I don't
Chris Angelico wrote:
As it
is, we have the case that most lowish integers have equivalent floats
(all integers within the range that most people use them), and beyond
that, you have problems.
No, I don't. I'm not talking about representing ints using
floats, I'm talking about representing
wxPhoenix.
The funny side of wxPhoenix is, that it *also* has its
own understanding of unicode and it finally only
succeeds to produce mojibakes.
I've tried to explained...
(I was an early wxPython user from wxPython 2.0 (!).
I used, tested, reported about, all wxPython versions up to
the shift
Chris Angelico wrote:
Earlier it was said that having both / and // lets you explicitly
choose whether you want a float result or an int by picking an
operator. I'm saying that's not so; the operator and the type aren't
quite orthogonal, but close to.
I don't think I said that, or if I did I
Chris Angelico wrote:
All other basic arithmetic operations on two numbers of the same type
results in another number of that type. ... There's
just one special case: dividing an integer by an integer yields a
float, if and only if you use truediv. It sticks out as an exception.
I take your
On Tue, Apr 22, 2014 at 8:28 AM, Gregory Ewing
greg.ew...@canterbury.ac.nz wrote:
The reason it doesn't work well is because of the
automatic promotion of ints to floats when they meet
other floats. This leads to a style where people often
use ints to stand for int-valued floats and expect
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 20/04/14 03:34, Michael Torrie wrote:
On 04/18/2014 10:49 PM, Andrew Berg wrote:
Python 3 is not the future; it is the present. If you're
developing an application, just use Python 3.4 and don't look
back unless you absolutely positively *need*
Paul Rubin no.email@nospam.invalid writes:
[people I know] use whatever is in the OS distro, and that is
generally still 2.6 or 2.7.
When the OS contains *both* Python 2 and Python 3, does Python 3 count
as “in the OS”?
Or will you only count Python 3 as “in the OS” when Python 2 is not
On Fri, 18 Apr 2014 21:50:09 -0700, Ethan Furman wrote:
Use Python 3 if you can. The best reason not to is if you have some
critical library that you absolutely need and it's not yet available on
3.
That's good advice, but it isn't just applicable to Python 3, it applies
to *any* critical
On Fri, 18 Apr 2014 23:40:18 -0700, Paul Rubin wrote:
It's just that the improvement
from 2 to 3 is rather small, and 2 works perfectly well and people are
used to it, so they keep using it.
Spoken like a true ASCII user :-)
The killer feature of Python 3 is improved handling of Unicode,
On Sat, 19 Apr 2014 09:26:53 -0400, Roy Smith wrote:
One of the problems is you don't know in advance if something is going
to stop you. By committing to P3 now, you are eliminating from possible
future use, all of those third-party modules which only support P2. And
you don't know which of
On Sat, 19 Apr 2014 19:37:31 +1000, Chris Angelico wrote:
On Sat, Apr 19, 2014 at 7:25 PM, Ian Kelly ian.g.ke...@gmail.com
wrote:
The change from / denoting classic
division to true division really only affects the case where both
operands are integers, so far as I'm aware. If you want to
On 2014-04-20 09:43, Steven D'Aprano wrote:
So really the advice comes down to:
- if you can, use the latest version of Python, which is 3.4;
- if you must, use the version of Python provided by your operating
system, which could be anything from Python 2.3 to 3.3;
- if you have no
Steven D'Aprano writes:
It doesn't round, it truncates.
[steve@ando ~]$ python2.7 -c print round(799.0/100)
8.0
[steve@ando ~]$ python2.7 -c print 799/100
7
Seems it floors rather than truncates:
$ python2.7 -c from math import trunc;print trunc(799./-100)
-7
$ python2.7 -c from math
On 04/20/2014 02:47 AM, Ian Foote wrote:
Depends on what OS you want to be running on. I don't know of any
currently-supported Enterprise distributions (long-term support)
that ship with Python 3.4.
I don't know if you'd count it as an Enterprise distribution, but
ubuntu 14.04 (LTS) ships
On Sun, 20 Apr 2014 15:38:03 +0300, Jussi Piitulainen wrote:
Steven D'Aprano writes:
It doesn't round, it truncates.
[steve@ando ~]$ python2.7 -c print round(799.0/100) 8.0
[steve@ando ~]$ python2.7 -c print 799/100 7
Seems it floors rather than truncates:
$ python2.7 -c from math
On Apr 19, 2014 2:54 PM, Chris Angelico ros...@gmail.com wrote:
On Sun, Apr 20, 2014 at 6:38 AM, Ian Kelly ian.g.ke...@gmail.com wrote:
Or you just cast one of them to float. That way you're sure you're
working with floats.
Which is inappropriate if the type passed in was a Decimal or a
On 2014-04-20 17:22, Ian Kelly wrote:
On Apr 19, 2014 2:54 PM, Chris Angelico ros...@gmail.com
mailto:ros...@gmail.com wrote:
On Sun, Apr 20, 2014 at 6:38 AM, Ian Kelly ian.g.ke...@gmail.com
mailto:ian.g.ke...@gmail.com wrote:
Or you just cast one of them to float. That way you're sure
On Mon, Apr 21, 2014 at 2:22 AM, Ian Kelly ian.g.ke...@gmail.com wrote:
When I'm writing a generic average function, I probably don't know whether
it will ever be used to average complex numbers.
This keeps coming up in these discussions. How often do you really
write a function that generic?
On Saturday, April 19, 2014 12:50:09 PM UTC+8, Ethan Furman wrote:
On 04/18/2014 08:28 PM, Anthony Papillion wrote:
What is the general feel of /this/ community? I'm about to start a
large scale Python project. Should it be done in 2 or 3? What are the
benefits, aside from the
Michael Torrie schrieb:
For example, RHEL 6 is Red Hat's most current enterprise distribution and
it does not yet even ship Python 2.7, to say nothing of Python 3. RHEL
7 has python 2.7 as the default system dependency, and currently does
not yet have any python3 packages in the official
On 04/20/2014 12:02 PM, Bernd Waterkamp wrote:
Michael Torrie schrieb:
For example, RHEL 6 is Red Hat's most current enterprise distribution and
it does not yet even ship Python 2.7, to say nothing of Python 3. RHEL
7 has python 2.7 as the default system dependency, and currently does
not
In article mailman.9383.1398012417.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Mon, Apr 21, 2014 at 2:22 AM, Ian Kelly ian.g.ke...@gmail.com wrote:
When I'm writing a generic average function, I probably don't know whether
it will ever be used to average complex
On 4/20/2014 5:40 PM, Roy Smith wrote:
In article mailman.9383.1398012417.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Mon, Apr 21, 2014 at 2:22 AM, Ian Kelly ian.g.ke...@gmail.com wrote:
When I'm writing a generic average function, I probably don't know whether
On 4/20/14, 5:40 PM, Roy Smith wrote:
In article mailman.9383.1398012417.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Mon, Apr 21, 2014 at 2:22 AM, Ian Kelly ian.g.ke...@gmail.com wrote:
When I'm writing a generic average function, I probably don't know whether
Chris Angelico wrote:
Truncating vs true is not the same as int vs float. If you mean to
explicitly request float division, you call float() on one or both
arguments. You're being explicit about something different.
If you know you're dealing with either ints or floats,
which is true in the
Terry Reedy wrote:
On 4/19/2014 9:06 PM, Gregory Ewing wrote:
Similarly, when you write // you're explicitly requesting
integer division.
One is requesting 'floor division'
3.0//2.0
1.0
In general that's true, but I'm talking about a context
in which you have some expectations as to the
On Mon, Apr 21, 2014 at 8:52 AM, Gregory Ewing
greg.ew...@canterbury.ac.nz wrote:
Chris Angelico wrote:
Truncating vs true is not the same as int vs float. If you mean to
explicitly request float division, you call float() on one or both
arguments. You're being explicit about something
On Sat, 19 Apr 2014 19:37:31 +1000, Chris Angelico wrote:
In Python 3, you have to say Oh but I want my integer division to
result in an integer:
I don't see why that's such a big hardship.
There are clear advantages to having an explicit way to
request non-floor division. Whatever way is
On Sat, 19 Apr 2014 20:25:32 -0700, Paul Rubin wrote:
Terry Reedy tjre...@udel.edu writes:
LibreOffice bundles 3.3. So anyone who does Python scripting in
LibreOffice is using Python 3. Actually, I believe LO uses Python
internally for some of its scripting. If so, everyone using LO is
Ian Kelly wrote:
def average(values):
return sum(values) / len(values)
This works for decimals, it works for fractions, it works for complex
numbers, it works for numpy types, and in Python 3 it works for ints.
That depends on what you mean by works. I would actually
find it rather
On Mon, Apr 21, 2014 at 9:50 AM, Walter Hurry walterhu...@lavabit.com wrote:
I would use Python 3 in a flash if only wxPython would support it.
There seems to be a Project Phoenix (found it at the other end of a
Google search) with that goal. I've no idea what its status is, but
you could help
On 4/20/2014 7:13 PM, Gregory Ewing wrote:
Terry Reedy wrote:
On 4/19/2014 9:06 PM, Gregory Ewing wrote:
Similarly, when you write // you're explicitly requesting
integer division.
One is requesting 'floor division'
3.0//2.0
1.0
The name 'floor division' and the float result are
On 21/04/2014 00:50, Walter Hurry wrote:
On Sat, 19 Apr 2014 20:25:32 -0700, Paul Rubin wrote:
Terry Reedy tjre...@udel.edu writes:
LibreOffice bundles 3.3. So anyone who does Python scripting in
LibreOffice is using Python 3. Actually, I believe LO uses Python
internally for some of its
Richard Damon wrote:
If you thing of the Standard Deviation being the Root Mean Norm2 of the
deviations, it has a very similar meaning as to over the reals, a
measure of the spread of the values.
NumPy appears to handle this:
http://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html
On Apr 20, 2014 8:01 PM, Gregory Ewing greg.ew...@canterbury.ac.nz
wrote:
Ian Kelly wrote:
def average(values):
return sum(values) / len(values)
This works for decimals, it works for fractions, it works for complex
numbers, it works for numpy types, and in Python 3 it works for ints.
On Sun, 20 Apr 2014 14:40:38 -0700, Roy Smith wrote:
In article mailman.9383.1398012417.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Mon, Apr 21, 2014 at 2:22 AM, Ian Kelly ian.g.ke...@gmail.com
wrote:
When I'm writing a generic average function, I probably
On Mon, 21 Apr 2014 09:24:09 +1000, Chris Angelico wrote:
On Mon, Apr 21, 2014 at 8:52 AM, Gregory Ewing
greg.ew...@canterbury.ac.nz wrote:
Chris Angelico wrote:
Truncating vs true is not the same as int vs float. If you mean to
explicitly request float division, you call float() on one or
On Mon, 21 Apr 2014 10:00:01 +1000, Chris Angelico wrote:
On Mon, Apr 21, 2014 at 9:50 AM, Walter Hurry walterhu...@lavabit.com
wrote:
I would use Python 3 in a flash if only wxPython would support it.
There seems to be a Project Phoenix (found it at the other end of a
Google search) with
On Mon, Apr 21, 2014 at 1:43 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
Explicitly choosing float division:
x / float(y)
But here you're not choosing an *operator*, you're choosing a *type*.
With this model, how do I distinguish between floor division and true
division
On Mon, Apr 21, 2014 at 1:43 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
Both explicit forms can be done cleanly without empowering the language
with the magic of int/int-float.
It's hardly magic, and I really am having difficult in working out
exactly what your objection
Anthony Papillion papill...@gmail.com writes:
Some say 'Python 3 is the future, use it for everything now' and other
say 'Python 3 is the future but you can't do everything in it now so
use Python 2'.
Python 3 is generally better than Python 2, except for a few packages
that haven't been
On Sat, Apr 19, 2014 at 4:40 PM, Paul Rubin no.email@nospam.invalid wrote:
If you're starting a new project and you get to choose between 2 and 3,
other things equal I'd say use 3. I've kept using 2 basically because
it's the path of least resistance. I'm somewhat following the 3
situation
On Sat, Apr 19, 2014 at 1:34 AM, Chris Angelico ros...@gmail.com wrote:
That'll make Python 2.6/2.7 behave like Python 3.x in three ways:
firstly, print will be a function instead of a statement (and it's
more powerful than the statement form, as well as being more
flexible); secondly, quoted
On Sat, Apr 19, 2014 at 7:25 PM, Ian Kelly ian.g.ke...@gmail.com wrote:
The change from / denoting classic
division to true division really only affects the case where both
operands are integers, so far as I'm aware. If you want to divide two
integers and get a decimal result, then convert
Ian Kelly ian.g.ke...@gmail.com:
On Sat, Apr 19, 2014 at 1:34 AM, Chris Angelico ros...@gmail.com wrote:
if you're going to move to Python 3, you may as well have your code
start working that way, so you get used to typing // to divide
integers and get an integer (floor division).
[...]
Anthony Papillion papill...@gmail.com writes:
So I've been working with Python for a while and I'm starting to take
on more and more serious projects with it. I've been reading a lot
about Python 2 vs Python 3 and the community kind of seems split on
which should be used.
The community is in
On Saturday, April 19, 2014 4:35:41 PM UTC+5:30, Ben Finney wrote:
Well, it's clear: Python 3 is uncontroversially the future :-) Also:
\Spam will be a thing of the past in two years' time. --Bill |
`\ Gates, 2004-01-24 |
_o__)
On Fri, 18 Apr 2014 22:28:05 -0500, Anthony Papillion papill...@gmail.com
wrote:
Hello Everyone,
So I've been working with Python for a while and I'm starting to take
on more and more serious projects with it. I've been reading a lot
about Python 2 vs Python 3 and the community kind of seems
On Sat, Apr 19, 2014 at 9:53 PM, Steve Hayes hayes...@telkomsa.net wrote:
Some say 'Python 3 is the future, use it for everything now' and other
say 'Python 3 is the future but you can't do everything in it now so
use Python 2'.
Yes, that made me more or less abandon my attempt to learn Python.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 19/04/14 05:49, Andrew Berg wrote:
On 2014.04.18 22:28, Anthony Papillion wrote:
What is the general feel of /this/ community? I'm about to start
a large scale Python project. Should it be done in 2 or 3? What
are the benefits, aside from the
On 2014.04.19 07:58, Ian Foote wrote:
Django has been there since 1.5. My company has been using python3 in
production since 1.6 was released. There have been a few other third
party libraries we've wanted to use but can't, but we've been able to
work around that.
I guess I'm a bit behind the
On 4/19/2014 12:04 AM, Ryan Hiebert wrote:
If you are starting a new project, I'd highly encourage you to use
Python 3. It is a stable, well supported, and beautiful language, and
gives you the full power of the innovation that is current in the
Python world. Python 2 is still well supported
Chris Angelico ros...@gmail.com wrote:
I strongly recommend going for Python 3 unless something actually
stops you from doing so.
One of the problems is you don't know in advance if something is going
to stop you. By committing to P3 now, you are eliminating from possible
future use, all of
On Sat, Apr 19, 2014 at 11:26 PM, Roy Smith r...@panix.com wrote:
Chris Angelico ros...@gmail.com wrote:
I strongly recommend going for Python 3 unless something actually
stops you from doing so.
One of the problems is you don't know in advance if something is going
to stop you. By
On Friday, April 18, 2014 10:28:05 PM UTC-5, Anthony Papillion wrote:
Hello Everyone,
So I've been working with Python for a while and I'm starting to take
on more and more serious projects with it. I've been reading a lot
about Python 2 vs Python 3 and the community kind of seems split on
On Saturday, April 19, 2014 5:23:01 PM UTC+5:30, Steve Hayes wrote:
It took me a week, with some help from this forum, to get the Print statement
to work.
How long does it take one to learn to drive a car?
To play the piano? To become a brain surgeon?
No I am not exactly in the gung-ho over
On 19/04/2014 14:06, Eric S. Johansson wrote:
On 4/19/2014 12:04 AM, Ryan Hiebert wrote:
If you are starting a new project, I'd highly encourage you to use
Python 3. It is a stable, well supported, and beautiful language, and
gives you the full power of the innovation that is current in the
On 4/19/2014 2:40 AM, Paul Rubin wrote:
That said, I don't know anyone who actually uses Python 3.
I have no idea who you know ;-)
LibreOffice bundles 3.3. So anyone who does Python scripting in
LibreOffice is using Python 3. Actually, I believe LO uses Python
internally for some of its
On 19/04/2014 07:40, Paul Rubin wrote:
That said, I don't know anyone who actually uses Python 3.
You do now :)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
---
This email is free from viruses and malware because
On Sun, Apr 20, 2014 at 3:23 AM, Terry Reedy tjre...@udel.edu wrote:
LibreOffice bundles 3.3. So anyone who does Python scripting in LibreOffice
is using Python 3.
This much I agree with...
Actually, I believe LO uses Python internally for some of
its scripting. If so, everyone using LO is
- Original Message -
From: Chris Angelico ros...@gmail.com
To:
Cc: python-list@python.org python-list@python.org
Sent: Saturday, April 19, 2014 3:42 PM
Subject: Re: Why Python 3?
snip
Right. It's not the magic line that fixes everything; if it were,
Python 3 wouldn't be a big
On Sat, Apr 19, 2014 at 3:37 AM, Chris Angelico ros...@gmail.com wrote:
On Sat, Apr 19, 2014 at 7:25 PM, Ian Kelly ian.g.ke...@gmail.com wrote:
The change from / denoting classic
division to true division really only affects the case where both
operands are integers, so far as I'm aware. If
On Sun, Apr 20, 2014 at 5:58 AM, Ian Kelly ian.g.ke...@gmail.com wrote:
Considering that Fraction and Decimal did not exist yet, what type do
you think the PEP 238 implementers should have chosen for the result
of dividing two ints? If float is not acceptable, and int is not
acceptable (which
On Sat, Apr 19, 2014 at 2:31 PM, Chris Angelico ros...@gmail.com wrote:
On Sun, Apr 20, 2014 at 5:58 AM, Ian Kelly ian.g.ke...@gmail.com wrote:
Considering that Fraction and Decimal did not exist yet, what type do
you think the PEP 238 implementers should have chosen for the result
of dividing
On Sun, Apr 20, 2014 at 6:38 AM, Ian Kelly ian.g.ke...@gmail.com wrote:
Or you just cast one of them to float. That way you're sure you're
working with floats.
Which is inappropriate if the type passed in was a Decimal or a complex.
In that case, you already have a special case in your code,
Chris Angelico wrote:
I'd rather have to explicitly request floating-point division;
When you write / in Python 3, you *are* explicitly requesting
floating-point division.
Similarly, when you write // you're explicitly requesting
integer division.
I don't see the problem. You write whatever
On Sun, Apr 20, 2014 at 11:06 AM, Gregory Ewing
greg.ew...@canterbury.ac.nz wrote:
Chris Angelico wrote:
I'd rather have to explicitly request floating-point division;
When you write / in Python 3, you *are* explicitly requesting
floating-point division.
Similarly, when you write //
Chris Angelico wrote:
Is your function so generic that it has to be able
to handle float, Decimal, or complex, and not care about the
difference, and yet has to ensure that int divided by int doesn't
yield int?
It doesn't have to be that generic to cause pain. Even if
you're only dealing with
On 04/18/2014 10:49 PM, Andrew Berg wrote:
Python 3 is not the future; it is the present. If you're developing
an application, just use Python 3.4 and don't look back unless you
absolutely positively *need* one of the big libraries that doesn't
fully support Python 3 yet.
Depends on what OS
Terry Reedy tjre...@udel.edu writes:
LibreOffice bundles 3.3. So anyone who does Python scripting in
LibreOffice is using Python 3. Actually, I believe LO uses Python
internally for some of its scripting. If so, everyone using LO is
indirectly using 3.3.
I didn't even know LO supported Python
On 4/19/2014 9:06 PM, Gregory Ewing wrote:
Chris Angelico wrote:
I'd rather have to explicitly request floating-point division;
When you write / in Python 3, you *are* explicitly requesting
floating-point division.
Similarly, when you write // you're explicitly requesting
integer division.
Hello Everyone,
So I've been working with Python for a while and I'm starting to take
on more and more serious projects with it. I've been reading a lot
about Python 2 vs Python 3 and the community kind of seems split on
which should be used.
Some say 'Python 3 is the future, use it for
If you are starting a new project, I'd highly encourage you to use Python
3. It is a stable, well supported, and beautiful language, and gives you
the full power of the innovation that is current in the Python world.
Python 2 is still well supported (for a while to come), but you won't have
the
On 2014.04.18 22:28, Anthony Papillion wrote:
What is the general feel of /this/ community? I'm about to start a
large scale Python project. Should it be done in 2 or 3? What are the
benefits, aside from the 'it's the future' argument?
Python 3 is not the future; it is the present. If you're
On 04/18/2014 08:28 PM, Anthony Papillion wrote:
What is the general feel of /this/ community? I'm about to start a
large scale Python project. Should it be done in 2 or 3? What are the
benefits, aside from the 'it's the future' argument?
This community is also split. ;)
Use Python 3 if you
On 2007-12-05, Chris Gonnerman [EMAIL PROTECTED] wrote:
I spent some time today reading about Python 3, and specifically the
differences between Python 3 and Python 2, and I was left with a
question... why? Why bother to change to Python 3, when the CPython
implementation is slower, and
A.T.Hofkamp wrote:
Well, Python 3 design is from the ground up, and aimed at the future, so they
are quite a few steps ahead of today's coding practice, let alone today's code
base (which is still 1.5 compatible as you discovered).
Just a small note from me:
Several people think that we are
On 5 Dez., 15:32, Christian Heimes [EMAIL PROTECTED] wrote:
Athttp://www.joelonsoftware.com/articles/fog69.htmlJoel
explains why rewriting from the scratch is often the worst strategy.
About migration strategies:
I do not exactly recollect whether it was in Eastland or Jugemanland,
Kay Schluehr wrote:
This unexpected attack in his rear frightened him so much, that he
leaped forward with all his might: the horse's carcase dropped on the
ground, but in his place the wolf was in the harness, and I on my part
whipping him continually: we both arrived in full career safe at
Chris Gonnerman [EMAIL PROTECTED] wrote in
message news:[EMAIL PROTECTED]
|I spent some time today reading about Python 3, and specifically the
| differences between Python 3 and Python 2, and I was left with a
| question... why?
Overall, to delete accumulated stuff, much of which would have
I spent some time today reading about Python 3, and specifically the
differences between Python 3 and Python 2, and I was left with a
question... why? Why bother to change to Python 3, when the CPython
implementation is slower, and probably will be for a while?
When I learned Python, 1.5 was
On Dec 4, 11:39 pm, Chris Gonnerman
I don't think I can surely be the only one. Certainly, I'm nobody
important; it's not as if my opinion has any real bearing on the
situation. I suspect that many Python coders will stay with 2.x; after
all, this is Open Source... there is no Micro$oft
83 matches
Mail list logo