A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-April/034409.html below:

[Python-Dev] PEP305 csv package: from csv import csv?

[Python-Dev] PEP305 csv package: from csv import csv? [Python-Dev] PEP305 csv package: from csv import csv?Hamish Lawson hbl@st-andrews.ac.uk
Wed, 09 Apr 2003 14:35:46 +0100
[Please excuse my posting this message here after initially posting it to 
python-list, but I realised afterwards that this might be the more 
appropriate forum (it hasn't so far had any responses on python-list anyway).]

According to the documentation in progress at

      http://www.python.org/dev/doc/devel/whatsnew/node14.html

use of the forthcoming csv module (as described in PEP305) requires it to
be imported from the csv package:

      from csv import csv

      input = open('datafile', 'rb')
      reader = csv.reader(input)
      for line in reader:
          print line

Is there some reason why the cvs package's __init__.py doesn't import the
required names from cvs.py, so allowing the shorter form below?

      import csv

      input = open('datafile', 'rb')
      reader = csv.reader(input)
      for line in reader:
          print line


Hamish Lawson




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4