Return to Home Page
      Blog     Consulting     Seminars     Calendar     Books     CD-ROMS     Newsletter     About     FAQ      Search
 

Naming a Python module "if.py" doesn't seem to work with Python 2.2. I haven't gone back to any older versions to see if and when this happened.

I renamed the module to "if_sample.py" and imported it, and got the expected results.

f  e  x


What does c01:if.py mean? (I know it means chapter 1, if.py,
but a different way of indicating files would be better.
How about:

Program Name: if.py
Chapter 1

Interactive Session: if
Chapter 1

I guess what confused me right off, is that you look like
you're doing an interactive session (ending with #:~). But
I don't know any systems that use that style of prompt (well,
maybe if you're running bash as root in your home directory :)

It looks like you're cat'ing the file, but you just show
the name. If you're adding a comment that that is the name
of the file, then say so.

I'll stop blathering here..

f  e  x


The blue highlighting of the keyword 'if' in the first line seems quite out of place.

In _Thinking_in_Java_, at least the HTML version I have, all of the comment lines are highlighted in green, which makes for a much more readable style.

f  e  x


This is a REALLY POOR example. No, it's worse. It's the stupidest bit of code. let x = yes, then if x == yes ???

and if.py can't be used, if is a keyword, can't be used for modules.

oh well...

f  e  x



Add your comment below. Use an empty line between each paragraph. Paragraphs will be automatically formatted, and single carriage returns will be respected. Use <code> to begin a code block, and </code> to end a code block. Your email address will not be visible to spam harvesters or used in any way except to contact you with further questions.

Your Email Address:

Search     Home     WebLog     Consulting     Seminars     Calendar     Books     CD-ROMS     Newsletter     About     Contact     Site Design     Server Maintenance     Powered by Zope
©2007 MindView, Inc.