[issue13718] Format Specification Mini-Language does not accept comma for percent value

2012-01-06 Thread Michael Kesper

New submission from Michael Kesper :

http://docs.python.org/library/string.html#format-specification-mini-language 
mentions:
Changed in version 2.7: Added the ',' option (see also PEP 378).

PEP 378 tells me:
The ',' option is defined as shown above for types 'd', 'e', 'f', 'g', 'E', 
'G', '%', 'F' and ''.

However:

Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> '{:.2,%}'.format(.537568)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: Invalid conversion specification
>>> '{:2,%}'.format(.537568)
'53.756800%'

--
messages: 150721
nosy: mkesper
priority: normal
severity: normal
status: open
title: Format Specification Mini-Language does not accept comma for percent 
value
type: behavior
versions: Python 2.7

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



[issue6503] Python Docs: 6.6.4. Mutable Sequence Types

2009-07-17 Thread Michael Kesper

New submission from Michael Kesper :

In http://docs.python.org/library/stdtypes.html#mutable-sequence-types
s.pop([i]) is listed. Correct would be:
s.pop(i)

--
assignee: georg.brandl
components: Documentation
messages: 90623
nosy: georg.brandl, mkesper
severity: normal
status: open
title: Python Docs: 6.6.4. Mutable Sequence Types
versions: Python 2.6

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



[issue5291] Windows upgrade to 2.6.1 requires 2.6 installer to be present

2009-02-17 Thread Michael Kesper

New submission from Michael Kesper :

When upgrading to 2.6.1, an error occurs if the old installer is not
found. I needed to open it several times until I read _what_ was needed.
Finding old installers on python.org requires too much search, too.

--
components: Installation
files: python_261.png
messages: 82305
nosy: mkesper
severity: normal
status: open
title: Windows upgrade to 2.6.1 requires 2.6 installer to be present
versions: Python 2.6
Added file: http://bugs.python.org/file13114/python_261.png

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



[issue5291] Windows upgrade to 2.6.1 requires 2.6 installer to be present

2009-02-18 Thread Michael Kesper

Michael Kesper  added the comment:

Hi,

On Tue, Feb 17, 2009 at 06:22:02PM +, Martin v. Löwis wrote:
> 
> Martin v. Löwis  added the comment:
> 
> How exactly did you install the old installer? It should have been
> cached into your Windows folder, so that it is available on uninstallation.

Now that you remind me, I remember having deleted some uninstall folders 
because the machine did not have any free disk space at that time.
Can possibly be closed. Thank you!

Best wishes
Michael
-- 
Free Software Foundation Europe (FSFE) [] (http://fsfeurope.org)
Treten Sie der Fellowship bei!   [][][]   (http://fsfe.org/join)
Ihre Spende ermöglicht unsere Arbeit!  ||  (http://fsfeurope.org/donate)

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



[issue29390] Python Tutorial should introduce iterators and generators

2017-01-30 Thread Michael Kesper

New submission from Michael Kesper:

Please look at 
http://stackoverflow.com/questions/41932287/how-can-i-create-a-loop-for-these-if-statements/41932494?noredirect=1#41932494
 

For beginners, it would be good to introduce the concepts of 'pythonic' dealing 
with sequences (iterators) and streams (generators) as soon as possible and 
everywhere where sequenceable data structures are discussed.

It is a common idiom in other languages to access members of sequences with 
counters, risking off-by-one errors or IndexErrors.

If beginners aren't introduced to the 'right' concepts soon enough, they might 
have a hard time figuring out the 'iterator' way.
Iterators should at least be mentioned in 
https://docs.python.org/3/tutorial/datastructures.html#looping-techniques.

--
assignee: docs@python
components: Documentation
messages: 286480
nosy: docs@python, mkesper
priority: normal
severity: normal
status: open
title: Python Tutorial should introduce iterators and generators
type: enhancement

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



[issue23241] shutil should accept pathlib types

2015-01-14 Thread Michael Kesper

New submission from Michael Kesper:

source_path = Path('../data')
destination_path = Path('//file_server/work/whatever')
for file_name in source_path.glob('xyz-*'):
shutil.copyfile(source_path / file_name, destination_path / file_name)

leads to:

Traceback (most recent call last):
  File "copy_shares_2_work.py", line 9, in 
shutil.copyfile(source_path / file_name, destination_path / file_name)
  File "C:\Python34\lib\shutil.py", line 90, in copyfile
if _samefile(src, dst):
  File "C:\Python34\lib\shutil.py", line 75, in _samefile
return os.path.samefile(src, dst)
  File "C:\Python34\lib\genericpath.py", line 90, in samefile
s1 = os.stat(f1)
TypeError: argument should be string, bytes or integer, not WindowsPath

Converting to str() works but is unexpected.

--
messages: 234025
nosy: mkesper
priority: normal
severity: normal
status: open
title: shutil should accept pathlib types
type: behavior
versions: Python 3.4

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