[issue29664] zip() python 3 documentation not working at all !

2017-02-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Your example works for me.

>>> x = [1, 2, 3]
>>> y = [4, 5, 6]
>>> zipped = zip(x, y)
>>> print(zipped)

>>> print(list(zipped))
[(1, 4), (2, 5), (3, 6)]

I guess you have overridden the builtin function "zip" by setting the global 
variable "zip".

>>> zip = (7, 8)
>>> zipped = zip(x, y)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'tuple' object is not callable

--
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue29664] zip() python 3 documentation not working at all !

2017-02-27 Thread Muhammad Salem

Muhammad Salem added the comment:

---
TypeError Traceback (most recent call last)
 in ()
  6 x = [1, 2, 3]
  7 y = [4, 5, 6]
> 8 zip(x, y)

TypeError: 'tuple' object is not callable

--
components:  -Interpreter Core

___
Python tracker 

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



[issue29664] zip() python 3 documentation not working at all !

2017-02-27 Thread Muhammad Salem

New submission from Muhammad Salem:

this code from the python documentation itself not working!

>>> x = [1, 2, 3]
>>> y = [4, 5, 6]
>>> zipped = zip(x, y)

this code is copied from the python 3 official documentation itself even though 
it is working for me I am using python 3.5.2 on ubuntu 16.04 LTS

--
components: Interpreter Core
messages: 288631
nosy: Muhammad Salem
priority: normal
severity: normal
status: open
title: zip() python 3 documentation not working at all !
type: compile error
versions: Python 3.5

___
Python tracker 

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