Reputation
328
Top tag
Next privilege 500 Rep.
Access review queues
Badges
1 9
Newest
 Critic
Impact
~15k people reached

  • 0 posts edited
  • 1 helpful flag
  • 29 votes cast
Feb
17
comment What is the relationship between scope and namespaces in Python?
Cool. You're right. This has become a bit nit-picky.
Feb
17
comment What is the relationship between scope and namespaces in Python?
Those docs are ancient, from when Python had a different model -> "At any time during execution, exactly three nested scopes are in use.". Those docs are from Python1 I think.
Feb
17
comment What is the relationship between scope and namespaces in Python?
"A scope refers to a region of a program from where a namespace can be accessed without a prefix." This doesn't even make sense, and is entirely syntactic. It has nothing to do with the semantics of namespaces or scope. The example code also glosses over the same lack of clarity.
Dec
20
comment The Better Parts and Delegation: Is Crockford Too Extreme?
Can we at least say almost never delegate? Could we say never delegate except where the lack of delegation is a bottleneck?
Dec
20
comment The Better Parts and Delegation: Is Crockford Too Extreme?
+1 But while the top answer on that question, with the metaphor of traveling a small distance, is very good, Crockford's saying never use delegation. So, allowing for extreme cases, which I assume he'd allow for too, can we generally ignore the inefficiencies? Is the extreme case hundreds of objects or millions?
Dec
18
comment Why aren't there other programming languages that compile to Python bytecode?
Having self as an arg to the method makes it easier to follow what happens when you're passing it around with decorators and so on. It's just another reference to the instance.
Jun
25
comment Why aren't there other programming languages that compile to Python bytecode?
Python is a very nice language, but the library and ecosystem is getting really tired. There's little point replacing the language to access the libraries.
Jan
7
comment Why do people hesitate to use Python 3?
It's a good answer, and makes a lot of sense, but there are significant upsides for companies that allow their developers to use the very best tools. Python3, as a language, is superior to Python2. A lot of software companies could make the investment back in time saved not dealing with unicode alone.
Oct
23
comment How to Avoid a Busy Loop Inside a Function That Returns the Object That's Being Waited For
I went with conditions over semaphores. It just fit the specifics of the problem better, but your answer's spot on. Cheers.
Oct
23
comment How to Avoid a Busy Loop Inside a Function That Returns the Object That's Being Waited For
It must return the string the user entered. If someone does help(), Python will print a message and create a prompt for some input by calling sys.stdin.readline. I need to assign a custom readline method that blocks and returns the user's input. It's removing the busy loop from that method [or whatever it calls] that's the problem.
Mar
16
comment I need some help with defining a shell syntax
Thanks. I've updated the question to make it clearer what I really need.
Mar
15
comment I need some help with defining a shell syntax
I'm actually struggling to find examples though.
Mar
15
comment I need some help with defining a shell syntax
I've edited the question to try and make things clearer. I'd like to know about features and syntax, but I'd be happy to just get some pointers on little known shells and interactive interpreter hacks and that kind of thing.
Mar
12
comment Would Python be too slow for client-side use in Browsers?
@MichaelT: You wrote "there is no technical design issue with javascript that makes it inappropriate for being a client side language". You mean Python not JS??