[Python-Dev] Keyword-only parameters

2015-04-14 Thread Eric V. Smith
I'm working on adding a numeric_owner parameter to some tarfile methods
(http://bugs.python.org/issue23193),

In a review, Berker suggested making the parameter keyword-only. I agree
that you'd likely never want to pass just "True", but that
"numeric_owner=True" would be a better usage.

But, I don't see a lot of keyword-only parameters being added to stdlib
code. Is there some position we've taken on this? Barring someone saying
"stdlib APIs shouldn't contain keyword-only params", I'm inclined to
make numeric_owner keyword-only.

Is there anything stopping me from making it keyword-only?

Thanks.
Eric.
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Andrew Svetlov
At least asyncio uses keyword-only intensively.

On Tue, Apr 14, 2015 at 1:40 PM, Eric V. Smith  wrote:
> I'm working on adding a numeric_owner parameter to some tarfile methods
> (http://bugs.python.org/issue23193),
>
> In a review, Berker suggested making the parameter keyword-only. I agree
> that you'd likely never want to pass just "True", but that
> "numeric_owner=True" would be a better usage.
>
> But, I don't see a lot of keyword-only parameters being added to stdlib
> code. Is there some position we've taken on this? Barring someone saying
> "stdlib APIs shouldn't contain keyword-only params", I'm inclined to
> make numeric_owner keyword-only.
>
> Is there anything stopping me from making it keyword-only?
>
> Thanks.
> Eric.
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> https://mail.python.org/mailman/options/python-dev/andrew.svetlov%40gmail.com



-- 
Thanks,
Andrew Svetlov
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Alexander Walters
Lacking anything anyone else says... the use case for keyword only 
arguments (where they actually make the code better rather than simply 
being different) is rather limited.



On 4/14/2015 13:40, Eric V. Smith wrote:

I'm working on adding a numeric_owner parameter to some tarfile methods
(http://bugs.python.org/issue23193),

In a review, Berker suggested making the parameter keyword-only. I agree
that you'd likely never want to pass just "True", but that
"numeric_owner=True" would be a better usage.

But, I don't see a lot of keyword-only parameters being added to stdlib
code. Is there some position we've taken on this? Barring someone saying
"stdlib APIs shouldn't contain keyword-only params", I'm inclined to
make numeric_owner keyword-only.

Is there anything stopping me from making it keyword-only?

Thanks.
Eric.
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/tritium-list%40sdamon.com


___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Steven D'Aprano
On Tue, Apr 14, 2015 at 01:40:40PM -0400, Eric V. Smith wrote:

> But, I don't see a lot of keyword-only parameters being added to stdlib
> code. Is there some position we've taken on this? Barring someone saying
> "stdlib APIs shouldn't contain keyword-only params", I'm inclined to
> make numeric_owner keyword-only.

I expect that's because keyword-only parameters are quite recent (3.x 
only) and most of the stdlib is quite old.

Keyword-only feels right for this to me too.

-- 
Steve
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Zachary Ware
On Tue, Apr 14, 2015 at 1:06 PM, Steven D'Aprano  wrote:
> On Tue, Apr 14, 2015 at 01:40:40PM -0400, Eric V. Smith wrote:
>> But, I don't see a lot of keyword-only parameters being added to stdlib
>> code. Is there some position we've taken on this? Barring someone saying
>> "stdlib APIs shouldn't contain keyword-only params", I'm inclined to
>> make numeric_owner keyword-only.
>
> I expect that's because keyword-only parameters are quite recent (3.x
> only) and most of the stdlib is quite old.
>
> Keyword-only feels right for this to me too.

+1

-- 
Zach
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Paul Sokolovsky
Hello,

On Tue, 14 Apr 2015 13:40:40 -0400
"Eric V. Smith"  wrote:

> I'm working on adding a numeric_owner parameter to some tarfile
> methods (http://bugs.python.org/issue23193),
> 
> In a review, Berker suggested making the parameter keyword-only. I
> agree that you'd likely never want to pass just "True", but that
> "numeric_owner=True" would be a better usage.
> 
> But, I don't see a lot of keyword-only parameters being added to
> stdlib code.

Well, majority of stdlib is stable, why would somebody suddenly
go and start adding some novelty to otherwise stable and consistent
API? But newer parts of stdlib, e.g. asyncio, visibly overuse
kw-only args.

> Is there some position we've taken on this? Barring
> someone saying "stdlib APIs shouldn't contain keyword-only params",
> I'm inclined to make numeric_owner keyword-only.
> 
> Is there anything stopping me from making it keyword-only?
> 
> Thanks.
> Eric.


-- 
Best regards,
 Paul  mailto:pmis...@gmail.com
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Joe Jevnik
I personally find that keyword only arguments make for nicer APIS. It also
makes subclassing easier because you are free to add new positional
arguments later. Especially for boolean arguments, I think keyword only is
a great API choice.

On Tue, Apr 14, 2015 at 2:06 PM, Steven D'Aprano 
wrote:

> On Tue, Apr 14, 2015 at 01:40:40PM -0400, Eric V. Smith wrote:
>
> > But, I don't see a lot of keyword-only parameters being added to stdlib
> > code. Is there some position we've taken on this? Barring someone saying
> > "stdlib APIs shouldn't contain keyword-only params", I'm inclined to
> > make numeric_owner keyword-only.
>
> I expect that's because keyword-only parameters are quite recent (3.x
> only) and most of the stdlib is quite old.
>
> Keyword-only feels right for this to me too.
>
> --
> Steve
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/joe%40quantopian.com
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Łukasz Langa
If you’re introducing a new parameter that is a boolean, making it kw-only is 
generally accepted. Some people (myself included) would encourage you to do so.

Besides asyncio, there are already new arguments that are kw-only in many 
modules, including configparser, unittest, xml.etree, xmlrpc, urllib.request, 
traceback, tarfile, shutil, ssl, etc.

> On Apr 14, 2015, at 1:40 PM, Eric V. Smith  wrote:
> 
> I'm working on adding a numeric_owner parameter to some tarfile methods
> (http://bugs.python.org/issue23193),
> 
> In a review, Berker suggested making the parameter keyword-only. I agree
> that you'd likely never want to pass just "True", but that
> "numeric_owner=True" would be a better usage.
> 
> But, I don't see a lot of keyword-only parameters being added to stdlib
> code. Is there some position we've taken on this? Barring someone saying
> "stdlib APIs shouldn't contain keyword-only params", I'm inclined to
> make numeric_owner keyword-only.
> 
> Is there anything stopping me from making it keyword-only?
> 
> Thanks.
> Eric.
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> https://mail.python.org/mailman/options/python-dev/lukasz%40langa.pl

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Eric V. Smith
On 04/14/2015 02:11 PM, Zachary Ware wrote:
> On Tue, Apr 14, 2015 at 1:06 PM, Steven D'Aprano  wrote:
>> On Tue, Apr 14, 2015 at 01:40:40PM -0400, Eric V. Smith wrote:
>>> But, I don't see a lot of keyword-only parameters being added to stdlib
>>> code. Is there some position we've taken on this? Barring someone saying
>>> "stdlib APIs shouldn't contain keyword-only params", I'm inclined to
>>> make numeric_owner keyword-only.
>>
>> I expect that's because keyword-only parameters are quite recent (3.x
>> only) and most of the stdlib is quite old.
>>
>> Keyword-only feels right for this to me too.
> 
> +1

Thanks. I'll make it keyword-only.

Eric.

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Status on PEP-431 Timezones

2015-04-14 Thread Lennart Regebro
OK, so I realized another thing today, and that is that arithmetic
doesn't necessarily round trip.

For example, 2002-10-27 01:00 US/Eastern comes both in DST and STD.

But 2002-10-27 01:00 US/Eastern STD minus two days is 2002-10-25 01:00
US/Eastern DST
However, 2002-10-25 01:00 US/Eastern DST plus two days is 2002-10-27
01:00 US/Eastern, but it is ambiguous if you want DST or not DST.
And you can't pass in a is_dst flag to __add__, so the arithmatic must
just pick one, and the sensible one is to keep to the same DST.

That means that:

tz = get_timezone('US/Eastern')
dt = datetime(2002, 10, 27, 1, 0, tz=tz, is_dst=False)
dt2 = dt - 420 + 420
assert dt == dt2

Will fail, which will be unexpected for most people.

I think there is no way around this, but I thought I should flag for
it. This is a good reason to do all your date time arithmetic in UTC.

//Lennart
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Ethan Furman
On 04/14, Eric V. Smith wrote:

> But, I don't see a lot of keyword-only parameters being added to stdlib
> code. Is there some position we've taken on this? Barring someone saying
> "stdlib APIs shouldn't contain keyword-only params", I'm inclined to
> make numeric_owner keyword-only.

os.path and shutil make extensive use of keyword-only params.

--
~Ethan~
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Larry Hastings



On 04/14/2015 01:40 PM, Eric V. Smith wrote:

I'm working on adding a numeric_owner parameter to some tarfile methods
(http://bugs.python.org/issue23193),

In a review, Berker suggested making the parameter keyword-only. I agree
that you'd likely never want to pass just "True", but that
"numeric_owner=True" would be a better usage.


Boolean parameters are the classic problem that keyword-only parameters 
solve.  It forces the caller to provide context for the parameter, 
solving the mystery-meat API problem of


   tarfile.extractall(".", None, True)



On 04/14/2015 01:56 PM, Paul Sokolovsky wrote:

But newer parts of stdlib, e.g. asyncio, visibly overuse kw-only args.


Overuse?  asyncio?  You mean "that thing Guido just wrote last year"?  
The most practical definition I've heard for the word "pythonic" is 
"code like Guido writes".



//arry/
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Paul Sokolovsky
Hello,

On Tue, 14 Apr 2015 15:40:32 -0400
Larry Hastings  wrote:

> On 04/14/2015 01:56 PM, Paul Sokolovsky wrote:
> > But newer parts of stdlib, e.g. asyncio, visibly overuse kw-only
> > args.
> 
> Overuse?  asyncio?  You mean "that thing Guido just wrote last
> year"? The most practical definition I've heard for the word
> "pythonic" is "code like Guido writes".

You probably read that sentence too fast, so let's clarify it up:

1. asyncio project, previously known as "tulip" is some 2.5 years old,
prooflink:
https://github.com/python/asyncio/commit/0b0da72d0d23a4c582ea07dd3d2638021183750e
 .
The fact that people still don't know it well enough (e.g. that it's
full of kw-only args, or that it's so old) is sad.

2. asyncio has >1 function which accepts just couple of arguments,
one of the arguments being forced as keyword-only. There can be
multiple opinions of how to treat such usage of kw-only arguments, and
one of the opinions can be summarized as "overuse of kw-only arguments".


And to state the obvious, Python had keyword arguments for ages, and
people used them all this time. The talk now is to *force* people to
use keyword arguments. Done right (as supposedly asyncio tries to do,
actual results may vary), it's good. But if it suddenly goes as a
fashion to make kw-only args *everywhere*, that can only lead to harder
to type and noisier to read code. So yes, people better err on the side
of not forcing them as such, leaving choice to the actual users. 
 

> //arry/



-- 
Best regards,
 Paul  mailto:pmis...@gmail.com
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Status on PEP-431 Timezones

2015-04-14 Thread Alexander Belopolsky
On Wed, Apr 8, 2015 at 11:18 AM, Lennart Regebro  wrote:
>
> I wrote PEP-431 two years ago, and never got around to implement it.
> This year I got some renewed motivation after Berker Peksağ made an
> effort of implementing it.
> I'm planning to work more on this during the PyCon sprints, and also
> have a BoF session or similar during the conference.


For those who were not at the conference, can someone summarize the
post-PyCon status of this PEP?

Is Barry still the "BDFL-Delegate"?  Is there an updated draft?  Should
this discussion move to python-ideas?
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Gregory P. Smith
On Tue, Apr 14, 2015 at 1:56 PM Alexander Walters 
wrote:

> Lacking anything anyone else says... the use case for keyword only
> arguments (where they actually make the code better rather than simply
> being different) is rather limited.
>
> I disagree.  For parameters not often passed or beyond 3-4 parameters
being used on any API I actually prefer that we start using keyword only
parameters for those.

I'd say feel free to use keyword only parameters when you believe they make
sense.  Most of the stdlib does not do it because most of the APIs were
defined in the 2.x era and maintaining compatibility with them is desirable
for 2AND3 compatible code. But for new things, feel free.

-gps


> On 4/14/2015 13:40, Eric V. Smith wrote:
> > I'm working on adding a numeric_owner parameter to some tarfile methods
> > (http://bugs.python.org/issue23193),
> >
> > In a review, Berker suggested making the parameter keyword-only. I agree
> > that you'd likely never want to pass just "True", but that
> > "numeric_owner=True" would be a better usage.
> >
> > But, I don't see a lot of keyword-only parameters being added to stdlib
> > code. Is there some position we've taken on this? Barring someone saying
> > "stdlib APIs shouldn't contain keyword-only params", I'm inclined to
> > make numeric_owner keyword-only.
> >
> > Is there anything stopping me from making it keyword-only?
> >
> > Thanks.
> > Eric.
> > ___
> > Python-Dev mailing list
> > Python-Dev@python.org
> > https://mail.python.org/mailman/listinfo/python-dev
> > Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/tritium-list%40sdamon.com
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/greg%40krypto.org
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Guido van Rossum
Also, why do you think we added the 'lone star' syntax? :-)

-- 
--Guido van Rossum (python.org/~guido)
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Status on PEP-431 Timezones

2015-04-14 Thread Lennart Regebro
On Tue, Apr 14, 2015 at 4:52 PM, Alexander Belopolsky
 wrote:
> For those who were not at the conference, can someone summarize the
> post-PyCon status of this PEP?
>
> Is Barry still the "BDFL-Delegate"?  Is there an updated draft?  Should this
> discussion move to python-ideas?

There is no status change except that it will need updates, but I'm
waiting with that until I know what updates are needed, and that means
an implementation is needed first.

//Lennart
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Keyword-only parameters

2015-04-14 Thread Glenn Linderman

On 4/14/2015 2:14 PM, Guido van Rossum wrote:

Also, why do you think we added the 'lone star' syntax? :-)


Hint: Not because Guido is from Texas
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Aprender Pythton

2015-04-14 Thread Baldomero Perez martinez
Quiero aprender python quiero empezar agradezco si me pueden ayudar L.I. 
Baldomero Pérez Martínez
Enc. Proy. Informatica
Fideicomiso Ingenio Atencingo 80326___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Aprender Pythton

2015-04-14 Thread Raúl Cumplido
Hola Baldomero,

Esta lista es para el desarrollo de el lenguaje Python. Para dudas sobre
como aprender Python o su utilización puedes utilizar la lista en español
python...@python.org o la lista en inglés python-l...@python.org
Existe también la lista en inglés para pedir ayuda para iniciarse en el uso
de Python tu...@python.org

Saludos,
Raúl
On 14 Apr 2015 20:03, "Baldomero Perez martinez" <
bpma...@yahoo.com.dmarc.invalid.mx> wrote:

> Quiero aprender python quiero empezar agradezco si me pueden ayudar
>
> L.I. Baldomero Pérez Martínez
> Enc. Proy. Informatica
> Fideicomiso Ingenio Atencingo 80326
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/raulcumplido%40gmail.com
>
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Aprender Pythton

2015-04-14 Thread Erik Rivera
Baldomero,

Veo que perteneces al estado de Puebla, México, existe la lista de Python
México https://mail.python.org/mailman/listinfo/python-mx, habemos varios
de Puebla que te podemos apoyar.

Saludos.

El 14 de abril de 2015, 19:50, Baldomero Perez martinez <
bpma...@yahoo.com.dmarc.invalid.mx> escribió:

> Quiero aprender python quiero empezar agradezco si me pueden ayudar
>
> L.I. Baldomero Pérez Martínez
> Enc. Proy. Informatica
> Fideicomiso Ingenio Atencingo 80326
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/erik.river%40gmail.com
>
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Aprender Pythton

2015-04-14 Thread Andrew Svetlov
I'm sorry. Please use English in the mailing list.

People may not understand your chatting.

2015-04-14 20:36 GMT-04:00 Erik Rivera :

> Baldomero,
>
> Veo que perteneces al estado de Puebla, México, existe la lista de Python
> México https://mail.python.org/mailman/listinfo/python-mx, habemos varios
> de Puebla que te podemos apoyar.
>
> Saludos.
>
> El 14 de abril de 2015, 19:50, Baldomero Perez martinez <
> bpma...@yahoo.com.dmarc.invalid.mx> escribió:
>
>> Quiero aprender python quiero empezar agradezco si me pueden ayudar
>>
>> L.I. Baldomero Pérez Martínez
>> Enc. Proy. Informatica
>> Fideicomiso Ingenio Atencingo 80326
>>
>> ___
>> Python-Dev mailing list
>> Python-Dev@python.org
>> https://mail.python.org/mailman/listinfo/python-dev
>> Unsubscribe:
>> https://mail.python.org/mailman/options/python-dev/erik.river%40gmail.com
>>
>>
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/andrew.svetlov%40gmail.com
>
>


-- 
Thanks,
Andrew Svetlov
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Aprender Pythton

2015-04-14 Thread Raúl Cumplido
Hi Andrew,

Is someone asking where to find resources to learn Python. We have
redirected him to the python lists both in english and spanish.

We should have replied in English if it would have been something related
to python-dev, but we have responded in Spanish as maybe the user doesn't
understand English.

Kind Regards,
Raúl

2015-04-14 20:41 GMT-04:00 Andrew Svetlov :

> I'm sorry. Please use English in the mailing list.
>
> People may not understand your chatting.
>
> 2015-04-14 20:36 GMT-04:00 Erik Rivera :
>
>> Baldomero,
>>
>> Veo que perteneces al estado de Puebla, México, existe la lista de Python
>> México https://mail.python.org/mailman/listinfo/python-mx, habemos
>> varios de Puebla que te podemos apoyar.
>>
>> Saludos.
>>
>> El 14 de abril de 2015, 19:50, Baldomero Perez martinez <
>> bpma...@yahoo.com.dmarc.invalid.mx> escribió:
>>
>>> Quiero aprender python quiero empezar agradezco si me pueden ayudar
>>>
>>> L.I. Baldomero Pérez Martínez
>>> Enc. Proy. Informatica
>>> Fideicomiso Ingenio Atencingo 80326
>>>
>>> ___
>>> Python-Dev mailing list
>>> Python-Dev@python.org
>>> https://mail.python.org/mailman/listinfo/python-dev
>>> Unsubscribe:
>>> https://mail.python.org/mailman/options/python-dev/erik.river%40gmail.com
>>>
>>>
>>
>> ___
>> Python-Dev mailing list
>> Python-Dev@python.org
>> https://mail.python.org/mailman/listinfo/python-dev
>> Unsubscribe:
>> https://mail.python.org/mailman/options/python-dev/andrew.svetlov%40gmail.com
>>
>>
>
>
> --
> Thanks,
> Andrew Svetlov
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/raulcumplido%40gmail.com
>
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Aprender Pythton

2015-04-14 Thread Andrew Svetlov
Python-dev is for development OF Python, not for development WITH Python or
Python LEARNING, BTW.

On Tue, Apr 14, 2015 at 8:46 PM, Raúl Cumplido 
wrote:

> Hi Andrew,
>
> Is someone asking where to find resources to learn Python. We have
> redirected him to the python lists both in english and spanish.
>
> We should have replied in English if it would have been something related
> to python-dev, but we have responded in Spanish as maybe the user doesn't
> understand English.
>
> Kind Regards,
> Raúl
>
> 2015-04-14 20:41 GMT-04:00 Andrew Svetlov :
>
>> I'm sorry. Please use English in the mailing list.
>>
>> People may not understand your chatting.
>>
>> 2015-04-14 20:36 GMT-04:00 Erik Rivera :
>>
>>> Baldomero,
>>>
>>> Veo que perteneces al estado de Puebla, México, existe la lista de
>>> Python México https://mail.python.org/mailman/listinfo/python-mx,
>>> habemos varios de Puebla que te podemos apoyar.
>>>
>>> Saludos.
>>>
>>> El 14 de abril de 2015, 19:50, Baldomero Perez martinez <
>>> bpma...@yahoo.com.dmarc.invalid.mx> escribió:
>>>
 Quiero aprender python quiero empezar agradezco si me pueden ayudar

 L.I. Baldomero Pérez Martínez
 Enc. Proy. Informatica
 Fideicomiso Ingenio Atencingo 80326

 ___
 Python-Dev mailing list
 Python-Dev@python.org
 https://mail.python.org/mailman/listinfo/python-dev
 Unsubscribe:
 https://mail.python.org/mailman/options/python-dev/erik.river%40gmail.com


>>>
>>> ___
>>> Python-Dev mailing list
>>> Python-Dev@python.org
>>> https://mail.python.org/mailman/listinfo/python-dev
>>> Unsubscribe:
>>> https://mail.python.org/mailman/options/python-dev/andrew.svetlov%40gmail.com
>>>
>>>
>>
>>
>> --
>> Thanks,
>> Andrew Svetlov
>>
>> ___
>> Python-Dev mailing list
>> Python-Dev@python.org
>> https://mail.python.org/mailman/listinfo/python-dev
>> Unsubscribe:
>> https://mail.python.org/mailman/options/python-dev/raulcumplido%40gmail.com
>>
>>
>


-- 
Thanks,
Andrew Svetlov
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Aprender Pythton

2015-04-14 Thread Ian Cordasco
On Tue, Apr 14, 2015 at 7:54 PM, Andrew Svetlov 
wrote:

> Python-dev is for development OF Python, not for development WITH Python
> or Python LEARNING, BTW.
>
> On Tue, Apr 14, 2015 at 8:46 PM, Raúl Cumplido 
> wrote:
>
>> Hi Andrew,
>>
>> Is someone asking where to find resources to learn Python. We have
>> redirected him to the python lists both in english and spanish.
>>
>> We should have replied in English if it would have been something related
>> to python-dev, but we have responded in Spanish as maybe the user doesn't
>> understand English.
>>
>> Kind Regards,
>> Raúl
>>
>> 2015-04-14 20:41 GMT-04:00 Andrew Svetlov :
>>
>>> I'm sorry. Please use English in the mailing list.
>>>
>>> People may not understand your chatting.
>>>
>>> 2015-04-14 20:36 GMT-04:00 Erik Rivera :
>>>
 Baldomero,

 Veo que perteneces al estado de Puebla, México, existe la lista de
 Python México https://mail.python.org/mailman/listinfo/python-mx,
 habemos varios de Puebla que te podemos apoyar.

 Saludos.

 El 14 de abril de 2015, 19:50, Baldomero Perez martinez <
 bpma...@yahoo.com.dmarc.invalid.mx> escribió:

> Quiero aprender python quiero empezar agradezco si me pueden ayudar
>
> L.I. Baldomero Pérez Martínez
> Enc. Proy. Informatica
> Fideicomiso Ingenio Atencingo 80326
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/erik.river%40gmail.com
>
>

 ___
 Python-Dev mailing list
 Python-Dev@python.org
 https://mail.python.org/mailman/listinfo/python-dev
 Unsubscribe:
 https://mail.python.org/mailman/options/python-dev/andrew.svetlov%40gmail.com


>>>
>>>
>>> --
>>> Thanks,
>>> Andrew Svetlov
>>>
>>> ___
>>> Python-Dev mailing list
>>> Python-Dev@python.org
>>> https://mail.python.org/mailman/listinfo/python-dev
>>> Unsubscribe:
>>> https://mail.python.org/mailman/options/python-dev/raulcumplido%40gmail.com
>>>
>>>
>>
>
>
> --
> Thanks,
> Andrew Svetlov
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/graffatcolmingov%40gmail.com
>
>
Andrew if you translate the text that was sent to Baldomero, you'll see
that's exactly what they said. Please don't be so rude (or lazy) to people
helping someone learn Python, regardless of whether they mistakenly posted
to the wrong list.
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Aprender Pythton

2015-04-14 Thread Andrew Svetlov
Ok, sorry.

On Tue, Apr 14, 2015 at 8:59 PM, Ian Cordasco 
wrote:

>
>
> On Tue, Apr 14, 2015 at 7:54 PM, Andrew Svetlov 
> wrote:
>
>> Python-dev is for development OF Python, not for development WITH Python
>> or Python LEARNING, BTW.
>>
>> On Tue, Apr 14, 2015 at 8:46 PM, Raúl Cumplido 
>> wrote:
>>
>>> Hi Andrew,
>>>
>>> Is someone asking where to find resources to learn Python. We have
>>> redirected him to the python lists both in english and spanish.
>>>
>>> We should have replied in English if it would have been something
>>> related to python-dev, but we have responded in Spanish as maybe the user
>>> doesn't understand English.
>>>
>>> Kind Regards,
>>> Raúl
>>>
>>> 2015-04-14 20:41 GMT-04:00 Andrew Svetlov :
>>>
 I'm sorry. Please use English in the mailing list.

 People may not understand your chatting.

 2015-04-14 20:36 GMT-04:00 Erik Rivera :

> Baldomero,
>
> Veo que perteneces al estado de Puebla, México, existe la lista de
> Python México https://mail.python.org/mailman/listinfo/python-mx,
> habemos varios de Puebla que te podemos apoyar.
>
> Saludos.
>
> El 14 de abril de 2015, 19:50, Baldomero Perez martinez <
> bpma...@yahoo.com.dmarc.invalid.mx> escribió:
>
>> Quiero aprender python quiero empezar agradezco si me pueden ayudar
>>
>> L.I. Baldomero Pérez Martínez
>> Enc. Proy. Informatica
>> Fideicomiso Ingenio Atencingo 80326
>>
>> ___
>> Python-Dev mailing list
>> Python-Dev@python.org
>> https://mail.python.org/mailman/listinfo/python-dev
>> Unsubscribe:
>> https://mail.python.org/mailman/options/python-dev/erik.river%40gmail.com
>>
>>
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/andrew.svetlov%40gmail.com
>
>


 --
 Thanks,
 Andrew Svetlov

 ___
 Python-Dev mailing list
 Python-Dev@python.org
 https://mail.python.org/mailman/listinfo/python-dev
 Unsubscribe:
 https://mail.python.org/mailman/options/python-dev/raulcumplido%40gmail.com


>>>
>>
>>
>> --
>> Thanks,
>> Andrew Svetlov
>>
>> ___
>> Python-Dev mailing list
>> Python-Dev@python.org
>> https://mail.python.org/mailman/listinfo/python-dev
>> Unsubscribe:
>> https://mail.python.org/mailman/options/python-dev/graffatcolmingov%40gmail.com
>>
>>
> Andrew if you translate the text that was sent to Baldomero, you'll see
> that's exactly what they said. Please don't be so rude (or lazy) to people
> helping someone learn Python, regardless of whether they mistakenly posted
> to the wrong list.
>



-- 
Thanks,
Andrew Svetlov
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Status on PEP-431 Timezones

2015-04-14 Thread Stuart Bishop
On 14 April 2015 at 21:04, Lennart Regebro  wrote:
> OK, so I realized another thing today, and that is that arithmetic
> doesn't necessarily round trip.
>
> For example, 2002-10-27 01:00 US/Eastern comes both in DST and STD.
>
> But 2002-10-27 01:00 US/Eastern STD minus two days is 2002-10-25 01:00
> US/Eastern DST
> However, 2002-10-25 01:00 US/Eastern DST plus two days is 2002-10-27
> 01:00 US/Eastern, but it is ambiguous if you want DST or not DST.
> And you can't pass in a is_dst flag to __add__, so the arithmatic must
> just pick one, and the sensible one is to keep to the same DST.

>>> import pytz
>>> from datetime import datetime, timedelta
>>> tz = pytz.timezone('US/Eastern')
>>> dt = tz.localize(datetime(2002, 10, 27, 1, 0), is_dst=False)
>>> dt2 = tz.normalize(dt - timedelta(days=2) + timedelta(days=2))
>>> dt == dt2
True
>>>
>>> tz.normalize(dt - timedelta(days=2))
datetime.datetime(2002, 10, 25, 2, 0, tzinfo=)
>>> tz.normalize(tz.normalize(dt - timedelta(days=2)) + timedelta(days=2))
datetime.datetime(2002, 10, 27, 1, 0, tzinfo=)


2002-10-27 01:00 US/Eastern is_dst=0 is after the DST transition
(EST). Subtracting 48 hours from it crosses the DST boundary and
should give you 2002-10-27 02:00 US/Eastern is_dst=1, prior to the DST
transition (EDT). Adding 48 hours again goes past 2002-10-27 01:00
EDT, crosses the DST boundary, and gives you back 2002-10-27 01:00
EST.


-- 
Stuart Bishop 
http://www.stuartbishop.net/
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com