Skip to content

osinfo.py simplification #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dmahugh opened this issue Feb 18, 2016 · 3 comments
Closed

osinfo.py simplification #37

dmahugh opened this issue Feb 18, 2016 · 3 comments

Comments

@dmahugh
Copy link
Contributor

dmahugh commented Feb 18, 2016

FYI, you can use enumerate() to simplify osinfo.py. Instead of this:

i=1
for item in profile:
print( '#',i,' ',item)
i=i+1;

... do this ...

for i, item in enumerate(profile, 1):
print( '#',i,' ',item)

@geekcomputers
Copy link
Owner

Thanks, feel free to make the change

Cheers
Craig
On 18 Feb 2016, at 20:39, Doug Mahugh [email protected] wrote:

FYI, you can use enumerate() to simplify osinfo.py. Instead of this:

i=1
for item in profile:
print( '#',i,' ',item)
i=i+1;

... do this ...

for i, item in enumerate(profile, 1):
print( '#',i,' ',item)


Reply to this email directly or view it on GitHub.

@dmahugh
Copy link
Contributor Author

dmahugh commented Feb 20, 2016

Pull request submitted. Nice set of tools, I'll continue looking through them. Cheers.

@geekcomputers
Copy link
Owner

Thanks very much

On 20 Feb 2016, at 05:24, Doug Mahugh [email protected] wrote:

Pull request submitted. Nice set of tools, I'll continue looking through them. Cheers.


Reply to this email directly or view it on GitHub.

@dmahugh dmahugh closed this as completed Dec 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants