Path: csiph.com!news.mixmin.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!not-for-mail From: animalize Newsgroups: comp.lang.python Subject: Collection: weak error prompt drives beginner crazy Date: Mon, 4 Apr 2016 19:24:49 +0800 Lines: 24 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de iPtjLFp/EYtIkjSRouopbQWFr/HxtaS8E2tT0lvBua0Q== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'lines:': 0.09; 'python': 0.10; 'subject:error': 0.11; 'output': 0.13; 'importing': 0.15; 'received:65.55.116.7': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:beginner': 0.16; 'attribute': 0.18; 'import': 0.24; '(most': 0.24; 'module': 0.25; 'header:User- Agent:1': 0.26; 'installed': 0.26; 'itself,': 0.29; "i'm": 0.30; 'e.g.': 0.30; 'says': 0.32; 'run': 0.33; 'traceback': 0.33; 'file': 0.34; 'library.': 0.35; 'problem.': 0.35; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'rather': 0.39; 'to:addr:python.org': 0.40; 'hour': 0.69; 'prompt': 0.79 X-TMN: [9MFJxWnYv+boRfMvSikUwCs4xVhxlr36] X-Originating-Email: [animalize81@hotmail.com] User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 X-OriginalArrivalTime: 04 Apr 2016 11:26:13.0445 (UTC) FILETIME=[CB9DDF50:01D18E64] X-Mailman-Approved-At: Mon, 04 Apr 2016 07:31:22 -0400 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: Xref: csiph.com comp.lang.python:106434 An example, the file-name is conflict with library-name in stdlib or installed library. There is a file uuid.py that only has two lines: import uuid print(uuid.uuid4()) Run uuid.py, output on Python 3.5.1: Traceback (most recent call last): File "D:\uuid.py", line 1, in import uuid File "D:\uuid.py", line 3, in print(uuid.uuid4()) AttributeError: module 'uuid' has no attribute 'uuid4' I was spending about an hour to find out what happend when I was a beginner, and I found I'm not the only one who confused by this problem. If the prompt can be beginner-friendly a little bit, I think it's a very good thing. E.g. says you are importing the file itself, rather than importing other file or library.