[Webkit-unassigned] [Bug 27119] bugzilla-tool: Add create-bug command
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 10 23:39:22 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=27119
--- Comment #13 from Mark Rowe (bdash) <mrowe at apple.com> 2009-07-10 23:39:21 PDT ---
(In reply to comment #11)
> > Can you explain how variable scoping works in Python?
>
> No, and I probably am remembering it wrong. :( Your sense that they should be
> "out of scope" makes sense.
Python is a little bit like JavaScript in that functions introduce a new scope,
but the contents of "if", "while" and friends don't. The only gotcha is that,
unlike JavaScript, the variable name is not actually bound until the assignment
statement executes. If you access the variable before the assignment executes
you'll be greeted with a name error. This is especially important to keep in
mind if only one side of an if/else assigns to a variable.
> > How does one "detect a string" in Python?
>
> I think there are typeof and isinstance operators. I'm pretty sure I detect a
> dict at one point in the code.
One typically doesn't do type detection in Python. What are we trying to do
here? Avoid callers needing to wrap a string up in a StringIO object before
passing to a function that takes a file-like object?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list