jonni83 / smartgarage

1 stars 1 forks source link

Import style #17

Closed nimbian closed 10 years ago

nimbian commented 10 years ago

Consider using more specific imports i.e. change "import ConfigParser" to "from ConfigParser import ConfigParser" and "import time" to "from time import sleep, time."

jonni83 commented 10 years ago

i fixed the time references. why would i use "from ConfigParser import ConfigParser"? I couldn't find any references that talk about doing this.

nimbian commented 10 years ago

Well just like for time it makes your code a little cleaner inside of the body. Plus I believe tho not 100% sure you will only import that one method rather than the entire class unnecessarily.

On Fri, May 23, 2014 at 1:17 AM, jonni83 notifications@github.com wrote:

i fixed the time references. why would i use "from ConfigParser import ConfigParser"? I couldn't find any references that talk about doing this.

— Reply to this email directly or view it on GitHubhttps://github.com/jonni83/smartgarage/issues/17#issuecomment-43962328 .