[issue26602] argparse doc introduction is inappropriately targeted

2016-03-22 Thread Brian Guo

Brian Guo added the comment:

Hi,

I agree with your observation about the unnecessarily complicated 
documentation. I feel that there is not a real necessity to include an example 
that uses (metavar='N', nargs='+') or even (const='sum', default='max') inside 
the parameters of the add_argument method, as they are not explained in the 
beginning section and simply appear to contribute clutter.

For this reason, I have written an easier document to understand (still keeping 
the sidebar tutorial, because it is a helpful reference). I use instead a 
method that accepts a string and returns the first letter. I hope this will add 
to the clarity of the document.

--
keywords: +patch
nosy: +BGuo1
Added file: http://bugs.python.org/file42248/bguo.patch

___
Python tracker 
<http://bugs.python.org/issue26602>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26616] A bug in datetime.astimezone() method

2016-03-23 Thread Brian Guo

Brian Guo added the comment:

>From the datetime documentation of astimezone(): 
https://docs.python.org/3.5/library/datetime.html#datetime.datetime.astimezone :

'If called without arguments (or with tz=None) the system local timezone is 
assumed. The tzinfo attribute of the converted datetime instance will be set to 
an instance of timezone with the zone name and offset obtained from the OS.'

You are correct in saying that there is an error in this implementation, but it 
is not that the second call should not change the timezone. Rather, the first 
call should have changed the timezone from UTC to America/New_York, or EST/EDT. 
When you made your first astimezone() call, (t = u.astimezone()), it was made 
without a tzinfo parameter, and should result in t's timzeone being EST by the 
documentation.

I have provided a patch that successfully adheres to this documentation. On 
changing the method, some of the tests failed; I have changed those tests to 
pass on the correct implementation of the method.

--
nosy: +BGuo1
Added file: http://bugs.python.org/file42267/bguo.patch

___
Python tracker 
<http://bugs.python.org/issue26616>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com