Python FAQ Processing

Source: Internet
Author: User

1:unused Import

Environment: Ubuntu 14.04 Eclipse 3.8

When developing using the Pydev plugin in the Eclipse environment, enter: Import Re, a yellow warning appears on the left, and the label will appear after it is placed: Unused import re

The reasons are as follows: (ref:http://stackoverflow.com/questions/16394732/unused-wild-import-why)

That's message just tells you're importing features from a module so you don ' t need, which means you should prob Ably import just what are you need. You shuld simply use where and is the from foobar import x, y x elements you y actually need. The syntax is more useful in the from foobar import * command-line interpreter if you don ' t want to think or type many more characters For little benefit. But in a real project, you should not use this syntax since if you use it, it won't be clear which feature from the MoD Ule you is going to use.

That is to say: Only import the RE and not use RE, and so on later use of the method of RE, this warning will naturally eliminate

Python FAQ Processing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.