473,551 Members | 2,722 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python Forum

Python programming language - Ask questions about python interpreter, control flow, data structures, modules errors, classes, standard library, gui, databases, unit testing, object oriented, structured programming and more.
37
2,362
thread by: Gregor Horvath | last post Jul 18 '05 by: Antoon Pardon
Hi, >>>type() <type 'list'> >>>type(('1')) <type 'str'> I wonder why ('1') is no tuple????
37
2,114
thread by: Kay Schluehr | last post Jul 18 '05 by: Ron_Adam
Since George Sakkis proposed a new way of doing list comprehensions http://groups-beta.google.com/group/comp.lang.python/browse_frm/thread/ac5023ad18b2835f/d3ff1b81fa70c8a7#d3ff1b81fa70c8a7 letting tuples-like objects (x,y,z=0) acting as functions on other tuples I wonder why this would not be a good starting point of rethinking anonymus...
37
2,963
thread by: jwaixs | last post Jul 21 '05 by: George Sakkis
arg... I've lost 1.5 hours of my precious time to try letting re work correcty. There's really not a single good re tutorial or documentation I could found! There are only reference, and if you don't know how a module work you won't learn it from a reference! This is the problem: >>> import re >>> str = "blabla<python>Re modules...
37
2,865
thread by: seberino | last post Jul 21 '05 by: Thomas Bartkus
I've been reading the beloved Paul Graham's "Hackers and Painters". He claims he developed a web app at light speed using Lisp and lots of macros. It got me curious if Lisp is inherently faster to develop complex apps in. It would seem if you could create your own language in Lisp using macros that that would be quite an advantage.... ...
37
3,517
thread by: Xah Lee | last post Oct 12 '05 by: Cruise Director
A Moronicity of Guido van Rossum Xah Lee, 200509 On Guido van Rossum's website: http://www.artima.com/weblogs/viewpost.jsp?thread=98196 dated 20050826, he muses with the idea that he would like to remove lambda, reduce(), filter() and map() constructs in a future version Python 3000.
37
2,763
thread by: Xiao Jianfeng | last post Nov 23 '05 by: Fredrik Lundh
Hi, I need to print a long sting, which is two long so it must expand two lines. I know that we can use backslash(\) to explicitly join two lines into a logical line, but this doesn't work for string literals :( my code: -----------------------------------------------------------------------------
37
2,774
thread by: spam.noam | last post Jan 16 '06 by: Antoon Pardon
Hello, Guido has decided, in python-dev, that in Py3K the id-based order comparisons will be dropped. This means that, for example, "{} < " will raise a TypeError instead of the current behaviour, which is returning a value which is, really, id({}) < id(). He also said that default equality comparison will continue to be identity-based....
37
2,441
thread by: John Salerno | last post Feb 24 '06 by: John Salerno
I contacted my domain host about how Python is implemented on their server, and got this response: ------------------- Hello John, Please be informed that the implementation of python in our server is through mod_python integration with the apache. These are the steps needed for you to be able to run .py script directly
37
3,256
thread by: Steven Bethard | last post Apr 18 '06 by: Fredrik Lundh
The PEP below should be mostly self explanatory. I'll try to keep the most updated versions available at: http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt http://ucsu.colorado.edu/~bethard/py/pep_create_statement.html PEP: XXX Title: The create statement
37
1,829
thread by: Nick Maclaren | last post Jul 1 '06 by: vatamane
The way that I read it, Python allows only values (and hence types) to be immutable, and not class members. The nearest approach to the latter is to use the name hiding conventions. Is that correct? Regards, Nick Maclaren.
37
2,750
thread by: Tim N. van der Leeuw | last post Jul 10 '06 by: Piet van Oostrum
Hi, The following might be documented somewhere, but it hit me unexpectedly and I couldn't exactly find this in the manual either. Problem is, that I cannot use augmented assignment operators in a nested scope, on variables from the outer scope: PythonWin 2.4.3 (#69, Mar 29 2006, 17:35:34) on win32. Portions Copyright 1994-2004 Mark...
37
1,494
thread by: Gregory Guthrie | last post Jul 11 '06 by: Bryan
I am comparing Python to a few other scripting languages, and used a simple anagrams program as a sample. I was surprised ast a few python features that did not work as I would expect/wish; which caused less compact/expressive program styles that I wanted - reverting to a FORTRAN like series of assignments. For example, - why is len()...
37
1,166
thread by: Aahz | last post Oct 10 '06 by: John J. Lee
The following line of lightly munged code was found in a publicly available Python library... if schema.elements.has_key(key) is False: Sorry, just had to vent. -- Aahz (aahz@pythoncraft.com) <* http://www.pythoncraft.com/ "If you don't know what your program is supposed to do, you'd better not
37
2,194
thread by: at | last post Dec 16 '06 by: Colin J. Williams
I would like to spark the discussion about the following syntax problem I encounter. THE PROBLEM I have a lot times the following code: for x in : if x 0: ... more code...
37
5,749
thread by: Soccerplayer1316 | last post Dec 24 '06 by: bartonc
Would anyone know how to write a program in python that takes a directory (source) and backs up that directory into another directory (target directory)? I've been trying to work on it, but I have had no luck...any help?
37
2,313
thread by: psbasha | last post Jan 7 '08 by: psbasha
Hi , I have a file data as shown below and my requirement is to replace the ID of the number with some other ID number.Is there any method like "fseek()" so that we can replace the ID with the required ID without chnaging the filed format of the file while replacing Thanks in advance PSB Input : Sample.txt
37
19,159
thread by: bahoo | last post Apr 9 '07 by: Paul McGuire
Hi, I have a list like and as output I want If I myList.remove('0024') then only the first instance of '0024' is removed.
37
2,544
thread by: Michele Simionato | last post Dec 15 '07 by: Benoit
At work we are shopping for a Web framework, so I have been looking at the available options on the current market. In particular I have looked at Paste and Pylons and I have written my impressions here: http://www.phyast.pitt.edu/~micheles/python/yet-another-comparison-of-web-frameworks.html I do not speak too well of Pylons, so if you...
37
5,437
thread by: minkoo.seo | last post Oct 19 '07 by: bambam
Hi. I've got a question on the differences and how to define static and class variables. AFAIK, class methods are the ones which receives the class itself as an argument, while static methods are the one which runs statically with the defining class. Hence, my understanding is that static variables must be bound to the class defining the...
37
2,012
thread by: Jack | last post Aug 11 '08 by: Kris Kennaway
I know one benchmark doesn't mean much but it's still disappointing to see Python as one of the slowest languages in the test: http://blog.dhananjaynene.com/2008/07/performance-comparison-c-java-python-ruby-jython-jruby-groovy/
37
9,021
thread by: Michael Palmer | last post Oct 23 '08 by: Kay Schluehr
As anyone knows, the state of Python GUI programming is a little fractured at this time, with many toolkits, wrappers and meta-wrappers dead and alive, with or without documentation. I've come across two projects that have the appeal of striving for simple, pythonic APIs: PyGUI and wax. The latter is a wrapper around wxPython. It is ...
38
2,846
thread by: Anthony Baxter | last post Jul 18 '05 by: Alex Martelli
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.3.1 (final). Python 2.3.1 is a pure bug fix release of Python 2.3, released in late July. A number of obscure crash-causing bugs have been fixed, various memory leaks have been squished, but no new features have been added to the...
38
3,702
thread by: kbass | last post Jul 18 '05 by: Matthias
In different articles that I have read, persons have constantly eluded to the productivity gains of Python. One person stated that Python's productivity gain was 5 to 10 times over Java in some in some cases. The strange thing that I have noticed is that there were no examples of this productivity gain (i.e., projects, programs, etc.,...). ...
38
2,557
thread by: Kevin Smith | last post Jul 18 '05 by: Paul Morrow
For what it's worth, I wrote the original PEP 318. I probably wasn't qualified, but I just wanted a nice simple way to declare class methods without having to repeat the function name. After submitting it to BDFL for approval, more work was needed and the discussion of PEP 318 on python-dev increased rapidly. It was evident that I was in...
38
3,647
thread by: Grant Edwards | last post Jul 18 '05 by: Michael Spencer
In an interview at http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=273 Alan Kay said something I really liked, and I think it applies equally well to Python as well as the languages mentioned: I characterized one way of looking at languages in this way: a lot of them are either the agglutination of features or they're a...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.