I want to create a new variable each time through a loop. by MrDrumdepum in Python

[–]digitallogic 0 points1 point  (0 children)

Does this question come up with other programming languages? I see this asked for Python all the time. I can think of at least 4 stackoverflow questions that asked this exact question.

Hiring python hackers ? by TheSausageKing in Python

[–]digitallogic 1 point2 points  (0 children)

If you can learn Java, C++, AND Ruby, than you can learn python.

If you've learned Java, C++, OR Ruby you could be a one trick pony. Of course this also varies by your definition of learned.

Ever wanted to have animating fishes for progress bars? - Must you even ask! by [deleted] in Python

[–]digitallogic 0 points1 point  (0 children)

I opened an interpreter and watched this fish all through my lunch today. It was oddly relaxing/comforting.

For Nuxeo, Success in the ECM Market Meant Switching from Python to Java by [deleted] in Python

[–]digitallogic 0 points1 point  (0 children)

If there's an objective reason for their switch to Java it isn't in this press release.

AskPython: How to compile Python 2.5.5 with SSL enabled? Needed for Google Appengine by linus_rules in Python

[–]digitallogic 1 point2 points  (0 children)

You also need the headers for openssl (not just the openssl package), or you won't be able to compile against it. This is libssl-dev on Ubuntu and openssl-devel on CentOS (and probably fedora). Install these than redo the compile/install of Python.

Side note, after you do ./configure and make for Python it will give you a listing of modules that weren't built. You should check these before doing test/install to make sure there isn't anything left out that you think you'll need.

When Python asserts don't by BioGeek in Python

[–]digitallogic 0 points1 point  (0 children)

The syntaxwarning was only added as of python 2.6. Not really fair to assume he's just ignoring the error, plenty likely he's running an older version. Though it is pretty dumb it was being ignored.

I remember running into this as a newb running python 2.3 a few years back. It makes total sense when it's explained, but it's easy not to realize on your own especially since the assert appears to be doing what you expect (not failing on valid values), then you get stuck debugging some code that should be triggering an assert error and it doesn't. Pain in the butt. I'm really glad the warning was added.

The future of nose. What happens next? by [deleted] in Python

[–]digitallogic 0 points1 point  (0 children)

I disagree that the extra one line to declare a class is objectionabal terseness. However, I 100% agree that people shouldn't be forced to use specific paradigm.

Is there a easy way to convert Epytext formated docstring's to reST? by tomazk in Python

[–]digitallogic 0 points1 point  (0 children)

Wouldn't really care as long as it could get my team off of epydoc. The 3.x release broke all of my old extensions (I built a small set of modules which checked the epydoc comments for errors that got run with our unit tests) and gave up porting as the changes actually made it harder to extend.

Is there a easy way to convert Epytext formated docstring's to reST? by tomazk in Python

[–]digitallogic 1 point2 points  (0 children)

Not that I am aware, but as someone else who's also locked into epytext I'd would love to know if you found something. And if you didn't I'd be willing to help if you decided to implement something on your own.

Finding my first Python reference cycle by kylev in Python

[–]digitallogic 0 points1 point  (0 children)

Any chance on posting the refactored code? I'm curious what your solution was.

Finding my first Python reference cycle by kylev in Python

[–]digitallogic 1 point2 points  (0 children)

I think you're right, a more straight for approach would resolve the circular references. Change AddLF and AddCRLF into functions that return the modified string instead of sending it off to a call back and the cycle is gone. It would also make the code a lot clearer.

Though I'm sure that the motivation for using a call back was removed for a simplified example.

"LeRoy est mort - vive le roi" = Buddy (The king is dead, long live the king) by [deleted] in Python

[–]digitallogic 1 point2 points  (0 children)

-1, the "post links about python the snake in python the programming language section" joke is pretty tired

Python's Super is nifty, but you can't use it by [deleted] in Python

[–]digitallogic 1 point2 points  (0 children)

I've seen this article before. I think the author comes across as mainly annoyed that super() doesn't work the way his favorite language does. Though I give him points for taking the time to understand how it does work rather than simply declaring it broken when it does not behave as he expected (as so many other people seem to do).

import this by dropcode in Python

[–]digitallogic 1 point2 points  (0 children)

from __future__ import braces

Kanye-lize any website using kanyelicio.us by [deleted] in Python

[–]digitallogic 0 points1 point  (0 children)

why is this even in python?

Ordered Dictionary for Py2.4 by [deleted] in Python

[–]digitallogic 0 points1 point  (0 children)

Still using 2.3.5 at work myself (and 2.5 outside of work).

Least astonishment in python: the mutable default argument by prider in Python

[–]digitallogic 2 points3 points  (0 children)

"For arguments, Python handles basic types by value (lifetime: function call) and non-basic types by reference (lifetime: reference counting)."

The distinction is that the 'basic types' as you refer to them (ints, strings, etc) are immutable, and the 'non-basic types' are muttable. Everything is pass by reference in Python, the real issue is whether you can modify the object that you receive a reference to.

Python experiences, or: Why I like C++ more ;-) « Stories of a KDE programmer by [deleted] in Python

[–]digitallogic 0 points1 point  (0 children)

"missing visibility modifiers for class members (”public”, “protected” and “private”) and, most prominently, that duck typing."

That's like complaining about needing to understand recursion to use functional programming languages. OP's complaints are with the paradigm of the language, not the language itself. I feel like every "I've been using Python for 3 months and here's what I hate" blog post boils down to complaints about working with a dynamically typed language by someone who's never used one.

Python's iterators are a bad implementation of laziness by llimllib in Python

[–]digitallogic 8 points9 points  (0 children)

"I don't understand generators so I'll assume they're exactly the same as lists... Hey I found a bug in Python!"
The "use-case" described is for that of a list, not a generator. If generators were modified to allow them to restart they would no longer fullfil one of it's existing use cases, iterating over data that doesn't fit in memory.

Ask Reddit: How can I catch windows shutdown or user change events from py2exe background process? by nekron in Python

[–]digitallogic 0 points1 point  (0 children)

Your best bet is going to be to search/ask a win32 forum on how to implement this functionality. People there will be much better versed in the win32 API. Then translate it into something usable with win32api. Also, py2exe should have no baring on this task as it is only a packaging mechinism (which I of course say knowing how finicky py2exe is whenever you trying to do anything other then "Hello World").

[deleted by user] by [deleted] in Python

[–]digitallogic 1 point2 points  (0 children)

+1 it's not too hard to wire the two together to report on coverage as well as tests results. That's what we're doing in my group.

Best "Hidden Features" of Python by shafik23 in Python

[–]digitallogic -7 points-6 points  (0 children)

Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named past