I'm trying to organize a group of people to run a Python booth at OSCON
so that people will see an alternative to Perl. ;-) I'd like at least
ten or twelve volunteers so that nobody has to pull a long shift. If
you're interested, please subscribe to the OSCON mailing list:
Paul Rubin replied to me:
If you're running a web site with 100k users (about 1/3 of the size of
Slashdot) that begins to be the range where I'd say LAMP starts
running out of gas.
Let me elaborate a bit. That claim of 100K from me is the
entire population of people who would use
On Saturday 11 June 2005 11:37 pm, ross wrote:
I want to do some tricky text file manipulation on many files, but have
only a little programming knowledge.
[...]
Would Python be best, or would a macro-scripting thing like AutoHotKey
work?
I thought about Perl, but think I would learn bad
Andrew Dalke [EMAIL PROTECTED] writes:
I know little about it, though I read at
http://goathack.livejournal.org/docs.html
] LiveJournal source is lots of Perl mixed up with lots of MySQL
I found more details at
http://jeremy.zawodny.com/blog/archives/001866.html
It's a bunch of things -
Why do people keep asking what language to use for certain things in the
Python newsgroup? Obviously the answer is going to biased.
Not that it's a bad thing because I love Python, but it doesn't make sense
if you honestly want an objective opinion.
R
ross wrote:
I want to do some tricky
Drazen Gemic wrote:
With Java I depend very little on customers IT staff, sysadmins, etc. If
I need additional functionality in form library, extension, whatever, all
I need is to drop another JAR in, and that does it.
Maybe this is for you?
http://peak.telecommunity.com/DevCenter/PythonEggs
ross wrote:
I want to do some tricky text file manipulation on many files, but have
only a little programming knowledge.
What are the ideal languages for the following examples?
1. Starting from a certain folder, look in the subfolders for all
filenames matching *FOOD*.txt Any files
I playing around with streaming shoutcast mp3s.
Here is some sample code:
---
import httplib
# Put together the headers
headers = {Icy-MetaData:1}
con = httplib.HTTPConnection('64.142.8.154', 8000)
con.request(GET, /)
stream = con.getresponse()
print
John Machin [EMAIL PROTECTED] writes:
Roy Smith wrote:
Philippe C. Martin [EMAIL PROTECTED] wrote:
Yet, many issues that a future software engineer should know are
mostly hidden by Python (ex: memory management) and that could be
detrimental.
I know I'm going out on a limb by asking this, but
I am not mistaken at all and the use of hyperbole (2 billion)
doesn't make your point .
A post that piques the interest of even 50 people in an NG is a valid
one. No doubt some people would be annoyed about a job posting of a
Python vacancy... others would be interested in it...
The
I should purhaps mention that i am basically trying to translate this.
nc ~= telnet
#!/bin/sh
nc sc1.liquidviewer.com 9012 EOF
GET / HTTP/1.0
Icy-MetaData:1
EOF
--
http://mail.python.org/mailman/listinfo/python-list
Andrew Dalke [EMAIL PROTECTED] writes:
Paul Rubin replied to me:
As for big, hmm, I'd say as production web sites go, 100k users is
medium sized, Slashdot is largish, Ebay is big, Google is huge.
I'ld say that few sites have 100k users, much less
daily users with personalized information. As
On Sat, 11 Jun 2005 19:47:58 -0500, Skip Montanaro wrote:
If the case values are constants known to the compiler, it can generate O(1)
code to take the correct branch. (In fact, that could be done by the
compiler for if statements such as in your example today. It just isn't.)
It is
I'm using a polling loop in a thread that looks approximately like this
while 1:
p = find_a_process()
rc = p.poll()
if rc is not None:
out, err = p.communicate()
#deal with output etc
sleep(1)
the process p is opened using
p = Popen(cmd, stdin=PIPE,
Philippe C. Martin wrote:
Leif K-Brooks wrote:
Joe Stevenson wrote:
I skimmed through the docs for Python, and I did not find anything like
a case or switch statement. I assume there is one and that I just
missed it. Can someone please point me to the appropriate document, or
post an
John Roth [EMAIL PROTECTED] writes:
Mike Meyer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Jon Slaughter [EMAIL PROTECTED] writes:
Someone mentioned that you might require JavaScript on the client
side. I recommend against that - people and organizations disable
JavaScript
Roose wrote:
Why do people keep asking what language to use for certain things in the
Python newsgroup? Obviously the answer is going to biased.
Not that it's a bad thing because I love Python, but it doesn't make sense
if you honestly want an objective opinion.
R
What usenet group is it
I'm coming to Python from other programming languages. I like to
hide all attributes of a class and to only provide access to them
via methods. Some of these languages allows me to write something
similar to this
int age( )
{
return theAge
}
void age( x : int )
{
theAge = x
}
(I usually do
On Sun, 12 Jun 2005 11:54:52 +0200, Kalle Anke [EMAIL PROTECTED] wrote:
I'm coming to Python from other programming languages. I like to
hide all attributes of a class and to only provide access to them
via methods. Some of these languages allows me to write something
similar to this
int age( )
I have a set of tests in different modules: test_foo.py, test_bar.py and so
on. All of these use the simplest possible internal layout: a number of
classes containing test*() methods, and the good old lines at the end:
if __name__ == __main__:
unittest.main()
This is great, because each
Kalle Anke wrote:
I'm coming to Python from other programming languages. I like to
hide all attributes of a class and to only provide access to them
via methods. Some of these languages allows me to write something
similar to this
int age( )
{
return theAge
}
void age( x : int )
{
On Sat, 11 Jun 2005 11:51:02 -0500, tom [EMAIL PROTECTED] wrote:
...
Let me add an Item #3 -
If you have some entrepeneurial savvy and can keep your emotions out of
it tou can simply tell them you have decided strike out on your own and
tell them that you will be available. They will be happy to
On Sun, 12 Jun 2005 03:15:27 -0700, Steve Jorgensen [EMAIL PROTECTED]
wrote:
...
Is this the Pythonic way of doing it or should I do it in a different
way or do I have to use setX/getX (shudder)
I'm totally new to Python myself, but my understanding is that
...
Oops - I thought I cancelled that
I guess because I have mostly worked with embedded systems and that,
although I have always tried to put abstraction layers between my
applications and the hardware, some constraints still remain at the
application level: (memory, determinism, re-entrance,...). You will notice
that 99% of the
Kalle Anke wrote:
I'm coming to Python from other programming languages. I like to
hide all attributes of a class and to only provide access to them
via methods.
I'm pretty fond of this format for setting up class properties:
class Klass(object):
def propname():
def
Mike Meyer wrote:
BTW, an alternative for the username is the USER environment
variable. I don't know whether or not it exists on Windows.
Or LOGNAME. Don't about windows, though.
I've also tried opening a pipe to sendmail, and feeding the
message to that instead. This too works great (and
ross wrote:
Roose wrote:
Why do people keep asking what language to use for certain things in the
Python newsgroup? Obviously the answer is going to biased.
Not that it's a bad thing because I love Python, but it doesn't make sense
if you honestly want an objective opinion.
R
Kalle Anke wrote:
I'm coming to Python from other programming languages. I like to
hide all attributes of a class and to only provide access to them
via methods.
(...)
Is this the Pythonic way of doing it or should I do it in a different
way or do I have to use setX/getX (shudder)
the
John Machin [EMAIL PROTECTED] wrote:
I know I'm going out on a limb by asking this, but why do you think future
software engineers should know about memory management?
Perhaps we have a terminology problem here i.e. different meanings of
software engineer. Philippe started talking about
Thomas Lotze wrote:
Does anybody here have a third way of dealing with this?
Sleeping a night sometimes is an insightful exercise *g*
I realized that there is a reason why fiddling with the pointer from
outside the generator defeats much of the purpose of using one. The
implementation using a
Thomas Lotze wrote:
A related problem is skipping whitespace. Sometimes you don't care about
whitespace tokens, sometimes you do. Using generators, you can either set
a state variable, say on the object the generator is an attribute of,
before each call that requires a deviation from the
On Sun, 12 Jun 2005, Mike Meyer wrote:
For instance, one problem was You have two files that have lists of 1
billion names in them. Print out a list of the names that only occur
in one of the files.
That's a one-line shell script: comm -12 (sort file_one) (sort file_two)
Incidentally, how
Thomas Lotze wrote:
Mike Meyer wrote:
What worries me about the approach of changing state before making a
next() call instead of doing it at the same time by passing a parameter is
that the state change is meant to affect only a single call. The picture
might fit better (IMO) if it didn't
On Sun, 12 Jun 2005 10:35:42 +1000,
Steven D'Aprano [EMAIL PROTECTED] wrote:
I don't relish the idea of especially long case statements.
I've never understood why something like:
if x = 5:
do_this
elif x = 6:
do_that
else:
do_something_else
is supposed to be bad, but
Jorgen Grahn [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have a set of tests in different modules: test_foo.py, test_bar.py and so
on. All of these use the simplest possible internal layout: a number of
classes containing test*() methods, and the good old lines at the end:
if
On Sun, 12 Jun 2005 12:20:29 +0200, tiissa wrote
(in article [EMAIL PROTECTED]):
You can 'hide' you getsetters using a property attribute[1]:
[1]http://docs.python.org/lib/built-in-funcs.html
Thanks, this is exactly what I was looking for
--
Hi
I have a little program that is importing from os.path import exists, join,
isdir, normpath, isfile
at one point in my program I check if a file exists using
if exists(c:\projects):
and that works fine.
If I change it to be
if exists(thepath):
where thepath is a commandline argument it does
For me, an 'is' test works to find out what widget the event is taking
place on.
#
import Tkinter
def display_event(e):
print event received, e.widget, e.widget is t
t = Tkinter.Tk()
t.bind(Destroy, display_event)
w =
In article [EMAIL PROTECTED],
Paul Rubin http://[EMAIL PROTECTED] wrote:
What example? Slashdot? It uses way more hardware than it needs to,
at least ten servers and I think a lot more. If LJ is using 6x as
many servers and taking 20x (?) as much traffic as Slashdot, then LJ
is doing
Hi,
I'm using MSXML to select elements from a XML document and want
to slice off the last part of an IXMLDOMNodeList.
import win32com.client
xmldoc = win32com.client.Dispatch('msxml.DOMDocument')
xmldoc.load('file.xml')
True
rgelem = xmldoc.selectNodes('/root/elem')
if rgelem.length 10:
On Sun, 12 Jun 2005 13:59:27 +0200, deelan wrote
(in article [EMAIL PROTECTED]):
the pythonic way is to use property (as others have already explained)
only when is *stricly necessary*. this may clarify things up:
Thanks for the link (although Java was only one of the languages I was
thinking
On Sun, 12 Jun 2005 15:35:15 +0200, John Machin wrote
(in article [EMAIL PROTECTED]):
OTOH, I beseech you to consider an attitude transplant :-)
;-)
I.e. put your effort into writing code that allows people to do useful
things, rather than opaque guff full of __blahblah__ that stops them
Does anyone know how to make ElementTree preserve namespace prefixes in
parsed xml files? The default behavior is to strip a document of all
prefixes and then replace them autogenerated prefixes like ns0, ns1,
etc. The correct behavior should be to write the file in the form that
it was read,
On Sun, 12 Jun 2005 15:35:46 +0200,
Kalle Anke [EMAIL PROTECTED] wrote:
In learning Python I've understood that I should write code in such a
way that it can handle different data and this is fine with me. But
what if I have a class where different attributes should only have
values of a
alex23 wrote:
Kalle Anke wrote:
I'm coming to Python from other programming languages. I like to
hide all attributes of a class and to only provide access to them
via methods.
I'm pretty fond of this format for setting up class properties:
class Klass(object):
def propname():
Kalle Anke wrote:
On Sun, 12 Jun 2005 13:59:27 +0200, deelan wrote
(in article [EMAIL PROTECTED]):
void doSomething( data : SomeClass ){ ... }
and I would be sure at compile time that I would only get SomeClass objects
as parameters into the method.
Being an untyped language, Python
Hi,
I wonder if there is a tool for generation Python API documentation
that can include source code into HTML output. Example:
http://api.rubyonrails.com/ I really like the possibility to click on
show source link and read the source of the method!
AFAIK it is not possible with Epydoc and
Jorgen Grahn wrote:
I have a set of tests in different modules: test_foo.py, test_bar.py and so
on. All of these use the simplest possible internal layout: a number of
classes containing test*() methods, and the good old lines at the end:
if __name__ == __main__:
unittest.main()
What about doing it yourself?
import inspect, os
print pre%s/pre % inspect.getsource(os.makedirs)
predef makedirs(name, mode=0777):
makedirs(path [, mode=0777])
Super-mkdir; create a leaf directory and all intermediate ones.
Works like mkdir, except that any intermediate path
On Sun, 12 Jun 2005 08:33:32 -0400, Dan Sommers wrote:
I've never understood why something like:
if x = 5:
do_this
elif x = 6:
do_that
else:
do_something_else
is supposed to be bad, but
case of:
x = 5:
do_this
x = 6:
do_that
otherwise:
On Sun, 12 Jun 2005 14:40:26 +, Chris Spencer wrote:
Being an untyped language, Python does not require you to enforce types.
However, for those that require such functionality, you can get away
with using the assert statement.
Assuming that Python isn't executed with the optimize
I want to startup the default web browser(ie...) to open a url, execl
can open a process, but when the process exit, the other process will
exit too, has any why to deal this problem?
--
http://mail.python.org/mailman/listinfo/python-list
Hi Roose,
Actually, it is a good thing because it allows those who know the Python
language to be able to show the benefits and weaknesses of the language.
Sure, the attitude here will be Yes, it's a great language. Yet, at
the same time, it also enables the poster to be able to see
Hi Bryan,
Here's a potential idea. Try converting the variable to a string by
using the following syntax:
thePath = str(thePathArg)
This will convert the current variable type to a string, which follows
the data type syntax that you have specified at the beginning of your
message.
flyaflya wrote:
I want to startup the default web browser(ie...) to open a url, execl
can open a process, but when the process exit, the other process will
exit too, has any why to deal this problem?
You want the 'webbrowser' module.
http://docs.python.org/lib/module-webbrowser.html
Will
Terry Reedy [EMAIL PROTECTED] writes:
M1st0 [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
where I can find the grammar of python bytecode ? ( better if is in
BCF
I believe the top-level production is something like
BYTECODE := (OPCODE ARGS)*
ROTFL :)
--
I am trying to make a simple data editor in Tkinter where each data
element has a corresponding Entry widget. I have tried to use the
FocusIn/FocusOut events to set a 'hasChanged' flag (if a record has not
changed, the db doesnt need updating). This seems to work fine except
that when the
Kalle Anke [EMAIL PROTECTED] writes:
[snap]
sys.maxint = -12345
I don't really understand what you're meaning.
He meant None = 1 :
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 12 Jun 2005 15:06:18 +, Chris Spencer wrote:
Does anyone know how to make ElementTree preserve namespace prefixes in
parsed xml files?
See the recent c.l.python thread titled ElemenTree and namespaces
and started May 16 2:03pm. One archive is at
Jorgen Grahn wrote:
I have a set of tests in different modules: test_foo.py, test_bar.py and so
on. All of these use the simplest possible internal layout: a number of
classes containing test*() methods, and the good old lines at the end:
if __name__ == __main__:
unittest.main()
Peter Dembinski [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
| Kalle Anke [EMAIL PROTECTED] writes:
|
| [snap]
|
| sys.maxint = -12345
|
| I don't really understand what you're meaning.
|
| He meant None = 1 :
I'm sure you know that has become a no-no in Python 2.4+ ;)
Bryan Rasmussen wrote:
... at one point in my program I check if a file exists using
if exists(c:\projects):
You should not be using a backslash in non-raw-string source to
mean anything but escape the next character. The above should
either be written as:
if exists(rc:\projects):
or:
Jeff Epler wrote:
For me, an 'is' test works to find out what widget the event is taking
place on.
... yes, I am apparently as stupid as I look. In my test code, I was
trying if event is widget, and I just now saw that. Thanks! :)
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 12 Jun 2005 15:35:46 +0200, Kalle Anke wrote:
Anyway, I got another problem (read: being used to do it like this in other
languages). I'm used to use statically typed languages and for me one of the
advantages is that I can be sure that a parameter is of a certain type. So in
Java
vincent wehren [EMAIL PROTECTED] writes:
Peter Dembinski [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
| Kalle Anke [EMAIL PROTECTED] writes:
|
| [snap]
|
| sys.maxint = -12345
|
| I don't really understand what you're meaning.
|
| He meant None = 1 :
I'm sure
William Gill wrote:
I am trying to make a simple data editor in Tkinter where each data
element has a corresponding Entry widget. I have tried to use the
FocusIn/FocusOut events to set a 'hasChanged' flag (if a record has not
changed, the db doesn't need updating). This seems to work fine
Resurrecting a month old thread.. (listed at
http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/2f4e50e1e316eef4/5924203f822f7f4b?q=cal_2pacrnum=3#5924203f822f7f4b)
Somehow - responses to that thread are not being brought up in
chronological order. Thus the creation of
Paul Rubin http://phr.cx@NOSPAM.invalid wrote in message
news:[EMAIL PROTECTED]
Andrew Dalke [EMAIL PROTECTED] writes:
If that's indeed the case then I'll also argue that each of
them is going to have app-specific choke points which are best
hand-optimized and not framework optimized. Is
12 Jun 2005 08:12:14 -0700, Michele Simionato [EMAIL PROTECTED]:
What about doing it yourself?
import inspect, os
print pre%s/pre % inspect.getsource(os.makedirs)
That's easy, thanks! I guess I'll submit a patch for Epydoc with the
functionality I've mentioned :)
--
Ksenia
--
Chris Spencer a écrit :
Kalle Anke wrote:
On Sun, 12 Jun 2005 13:59:27 +0200, deelan wrote
(in article [EMAIL PROTECTED]):
void doSomething( data : SomeClass ){ ... }
and I would be sure at compile time that I would only get SomeClass
objects as parameters into the method.
Being an
Bue Krogh Vedel-Larsen wrote:
But if I call
SA_PyVector_Type.tp_new = PyType_GenericNew;
PyType_Ready( SA_PyVector_Type );
then, when Py_Finalize is called, PyObject_IS_GC(op) in visit_decref() in
gcmodule.c causes an access violation. If I don't call PyType_Ready, then
the access
On Sun, 12 Jun 2005 08:11:47 -0400, Roy Smith wrote:
The point I was trying to make was that as computer science progresses,
stuff that was really important to know a lot about becomes more and more
taken for granted. This is how we make progress.
I used to worry about memory busses at
Andrew Dalke wrote:
On Sun, 12 Jun 2005 15:06:18 +, Chris Spencer wrote:
Does anyone know how to make ElementTree preserve namespace prefixes in
parsed xml files?
See the recent c.l.python thread titled ElemenTree and namespaces
and started May 16 2:03pm. One archive is at
just out of curiosity.. where'd you read the 150,000-200,000 servers...
i've never seen guesses that high.. i've seen somewhere as high as possible
100K... but the author stated that he was purely guessing...
-bruce
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
news:[EMAIL PROTECTED]
Thomas Lotze [EMAIL PROTECTED] writes:
A related problem is skipping whitespace. Sometimes you don't care about
whitespace tokens, sometimes you do. Using generators, you can either
set
a state variable, say on the object the generator is an attribute of,
before each
[EMAIL PROTECTED] (Aahz) writes:
So what? I think you're missing the real point of the article: using
LAMP scales *DOWN* in a way that enterprise systems don't. Getting your
first prototype up and running is far more important than sheer
scalability,
There comes a day when your first
Jonathan Ellis wrote:
William Gill wrote:
I am trying to make a simple data editor in Tkinter where each data
element has a corresponding Entry widget. I have tried to use the
FocusIn/FocusOut events to set a 'hasChanged' flag (if a record has not
changed, the db doesn't need updating).
#!/bin/env python
import bsddb
test=bsddb.btopen(test.tbl)
for m in JFMATQPHSOND:
test[m]=Profit for month +m+ $1B
def subyear_report(record_selection):
for data in record_selection.iteritems(): print data
# I was expecting a slice of an index file to yield a
# generator so not all the
Hi Bryan,
Here's a potential idea. Try converting the variable to a string by
using the following syntax:
thePath = str(thePathArg)
Actually it was a stupid thing, what happened was I was looping through the
commandline to build a file path in cases where there was more than one
Arsenal v Spurs in baseball that translates to Red Sox v Yankees.
--
http://mail.python.org/mailman/listinfo/python-list
Chris Spencer napisa(a):
Given xml with no namespaces, Elementtree works perfectly. However, if
you give the root tag an xmlns attribute, Elementtree relabels all child
nodes with it's own prefix, completely defeating the purpose of the
default namespace. In my opinion, this is
I need an IDE for python that has the ability to show the filds of a
class when I write .
Just the way it works in eclipse/JBuilder with java or visual studio
with c++
For now I treid eric3 and IDLE they don't do this...
--
http://mail.python.org/mailman/listinfo/python-list
Taking stuff for granted in unrelated to progress.
I agree that the trade of software engineering evolves and that, thanks to
hardware advances, we _usually_ can now object orient our software, add
billions of abstraction layers, and consume memory without a second
thought. But the trade evolves
Bruno Desthuilliers [EMAIL PROTECTED] writes:
[snap]
Being an untyped language, Python does not require you to enforce
types.
Nope. Python *is* typed. But it doesnt confuse implementation
with semantic.
Python is typed. And its type system may look strange for anyone who
did only Java or
Try ActiveState Komodo. It costs $30 for a personal license, and is well
worth it. If you like visual studio you will like it.
Like many other people, I have looked far and wide for a Python IDE and this
is what I've found. The free solutions don't cut it, at least without
spending many
If two objects are of equal value you can compare them with ==. What I
want to do is find out if two objects are actually just references to
the same object, how can I do this in Python?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] a écrit :
If two objects are of equal value you can compare them with ==. What I
want to do is find out if two objects are actually just references to
the same object, how can I do this in Python?
The most obvious way (as usual ?):
if obj1 is obj2:
// your code here
--
ross [EMAIL PROTECTED] writes:
What are the ideal languages for the following examples?
1. Starting from a certain folder, look in the subfolders for all
filenames matching *FOOD*.txt Any files matching in each folder should
be copied to a new subfolder within the current folder called
Steven D'Aprano [EMAIL PROTECTED] writes:
[snap]
new_text =
for word in text:
new_text = new_text + process(word)
new_text = .join(map(process, text))
(I couldn't resist)
--
http://mail.python.org/mailman/listinfo/python-list
Chris Spencer a écrit :
Bruno Desthuilliers wrote:
And *this* is highly unpythonic. And un-OO too, since it makes foo()
dependant on *class* Bar, when it should most probably be enough that
it only depends on (probably part of) the *interface* of class Bar.
I was providing the original
Peter Dembinski [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Terry Reedy [EMAIL PROTECTED] writes:
I believe the top-level production is something like
BYTECODE := (OPCODE ARGS)*
ROTFL :)
Glad to make your day ;-)
I am aware that since ARGS depends on OPCODE, the above would
Sorry about removing my message, I posted with the wrong google
account, I don't really want my email where those irritating spam bots
can find it.
The most obvious way (as usual ?):
if obj1 is obj2:
// your code here
I immediately thought of is, and tested it in the console, but it
didn't
[EMAIL PROTECTED] writes:
foo = 3
bar = 3
clearly foo and bar have the same value but they are different objects
aren't they?
No, they're the same object. Now try it with 300 instead of 3 ;-).
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] a écrit :
Sorry about removing my message, I posted with the wrong google
account, I don't really want my email where those irritating spam bots
can find it.
The most obvious way (as usual ?):
if obj1 is obj2:
// your code here
I immediately thought of is, and
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
But when I enter some Bulgarian (actually cyrillic) text as a string,
it
seems that Python automatically converts it to '\x00..\x00 ' and once
converted that way I can't get it back into its original look. The only
way to get it right is using print
Fascinating. With small strings, it uses the same object, and with
small numbers like 3. With 300 they were different objects (why,
shouldn't they both be ints still?)
Mutable objects functioned differently as you suggested:
foo = []
bar = []
foo == bar
True
foo is bar
False
Tuples (which are
Bruno Desthuilliers wrote:
Chris Spencer a écrit :
I was providing the original poster with a simple way to ensure
appropriate type.
s/appropriate type/specific implementation/
Hint : the appropriate type for print XXX is whatever has a
Peter Dembinski wrote:
Bruno Desthuilliers [EMAIL PROTECTED] writes:
Nope. Python *is* typed. But it doesnt confuse implementation
with semantic.
Python is typed. And its type system may look strange for anyone who
did only Java or C++ programming before :
Of course, in that Python is
Those who have read my posts today have probably understood that I'm
not a true Python programmer ... but I want to learn more (I think
that Python is rather fun).
I've read Learning Python pretty thoroughly, I've looked at some of
the tutorials, some of online documentation, etc. But I still
Post-EuroPython 2005 PyPy Sprint 1st - 7th July 2005
==
The next PyPy sprint is scheduled right after EuroPython 2005
in Gothenborg, Sweden. Its main focus is translation to
lower level backends but there are also other possible topics.
1 - 100 of 160 matches
Mail list logo