start_list = [5, 3, 1, 2, 4]
square_list = []
# Your code here!
for square_list in start_list:
x = pow(start_list, 2)
square_list.append(x)
square_list.sort()
print square_list
TypeError: unsupported operand type(s) for ** or pow(): 'list' and 'int'
Please provide me the solution for the
Robert wrote:
> Or how to build one?
Just download the source, and follow the instructions in
PCBuild/readme.txt. Then, edit the pythoncore project to remove
the files you don't want to include, and edit config.c to remove
the dangling references.
Regards,
Martin
--
http://mail.python.org/mailma
Robert wrote:
> Wouldn't it be an issue to think about if future win-python distributions
> should keep on including the asian codecs in the main-dll?
Indeed, it would. As I said before: if somebody defines a clear, fair
policy which finds agreement in the community, I'm willing to change the
curr
Hi,
I am trying to understand how cElementTree's clear works: I have a
(relatively) large XML file, that I do not wish to load into memory.
So, naturally, I tried something like this:
from cElementTree import iterparse
for event, elem in iterparse("data.xml"):
if elem.tag == "schnappi":
[ Fredrik Lundh ]
[ ... ]
> the iterparse/clear approach works best if your XML file has a
> record-like structure. if you have toplevel records with lots of
> schnappi records in them, iterate over the records and use find
> (etc) to locate the subrecords you're interested in: (...)
The proble
Tarek Ziadé wrote:
> I am trying to find a general memory profiler that can measure the
> memory usage in Python program
> and gather some stats about object usages, and things like that.
As Diez says, use gc: gc.getobjects() gives you all container objects.
If you want a list of all objects (cont
Michael Ströder wrote:
> Does that differ from 2.4.2c1? On Monday I noticed a crash in the test
> suite on a box running Solaris 8. It seems I can build Python 2.4.1 and
> run make test there without problems.
There is also a chance that you found a compiler bug. So reporting the
compiler you used
Trent Mick wrote:
> It is possible that the python.org installer didn't overwrite the
> "python24.dll" in the system directory (C:\WINDOWS\system32). Try doing
> this:
Even though this is apparently what happened, I'm puzzled as to why it
happened: shouldn't the version number of python24.dll in t
Trent Mick wrote:
> I suppose that is possible. Martin, does python-2.4.2.msi install
> python24.dll to the Python install dir for a "per-user" installation?
Yes, that is supported. It would be good if Bugs could confirm that
he only deleted the wrong python24.dll, with the proper one being
insta
Petr Prikryl wrote:
> I know about the rejected attempt to implement
> sys.argvu. Still, how the sys.argv is filled? What
> encoding is used when parsing the cmd line internally?
> To what encoding is it converted when non ASCII
> characters appear?
Python does not perform any conversion whatsoeve
Bugs wrote:
> - I had an old ActiveState python24.dll in \windows\system32 which I
> deleted. That must've been left over from a 2.4.1 ActiveState
> installation which I had installed then uninstalled sometime ago.
>
> - I then uninstalled Python 2.4.2 and re-installed it for "all" users.
> After
Tony Nelson wrote:
> Is there a faster way to decode from charmaps to utf-8 than unicode()?
You could try the iconv codec, if your system supports iconv:
http://cvs.sourceforge.net/viewcvs.py/python-codecs/practicecodecs/iconv/
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-l
Tony Nelson wrote:
> I had seen iconv. Even if my system supports it and it is faster than
> Python's charmap decoder, it might not be available on other systems.
> Requiring something unusual in order to do a trivial LUT task isn't an
> acceptable solution. If I write a charmap decoder as an
Java and Swing wrote:
> Is there some other way, besides SWIG, which will allow me to call
> functions inside an Ansi C DLL?
You could write an extension module. See Modules/xxmodule.c in
the Python source tree, as well as
http://docs.python.org/ext/ext.html
In the specific case, if it weren't f
Mike wrote:
> So it seems link.replace() function reads whether the first option is
> utf-8 and converts the second option automatically to utf-8? How do I
> prevent that?
Not sure what an option is... if you are talking about parameters,
rest assured that .replace does not know or care whether
[EMAIL PROTECTED] wrote:
> However the executable size is always the same :/ Please assist.
At a minimum, you should edit Modules/Setup to compile all extension
modules in.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Jeremy Moles wrote:
> PyObject* obj = _PyObject_New(&PyType_MyType);
> obj = PyObject_Init(obj, &PyType_MyType);
>
> ...
>
> return obj;
The call to PyObject_Init is redundant: _PyObject_New
is malloc+init. However, this shouldn't cause any crashes (except in the
de
John Perks and Sarah Mount wrote:
> I have to split some identifiers that are casedLikeThis into their
> component words. In this instance I can safely use [A-Z] to represent
> uppercase, but what pattern should I use if I wanted it to work more
> generally? I can envisage walking the string testin
Fredrik Lundh wrote:
I = iter(L)
I
>
>
>
len(I)
>
> 3
[...]
> (it's probably not a good idea to rely on this behaviour...)
I believe this has been classified as a bug in Python 2.4, which
will be undone in Python 2.5.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/pyt
Dave wrote:
> What exactly does it mean to "intern" a string?
"exactly" it means to place lookup the string in the
global interning dictionary. If an entry is found,
then interning yields the string in the interning dictionary.
If the string is not found, it is added to the interning
dictionary, a
Mike Meyer wrote:
> Out of random curiosity, is there a PEP/thread/? that explains why
> Python symbols are restricted to 7-bit ascii?
No PEP yet; I meant to write one for several years now.
The principles would be
- sources must use encoding declarations
- valid identifiers would follow the Unic
Brandon K wrote:
> PyTuple_SET_ITEM(py, i, Py_BuildValue("l",*result[i]);
Using Py_BuildValue is overkill here. PyInt_FromLong will do just
as well.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Does anyone know of an available downloader for an amd64 bit
> build of (a modern) python?
There is no official build. The only official Win64 build is
for Itanium, see www.python.org/2.4.2
> I've done my due diligence search of python docs and
> mailing archives, and I
Bengt Richter wrote:
> Perhaps string equivalence in keys will be treated like numeric equivalence?
> I.e., a key/name representation is established by the initial key/name
> binding, but
> values can be retrieved by "equivalent" key/names with different
> representations
> like unicode vs ascii
Bengt Richter wrote:
> Well, what will be assumed about name after the lines
>
> #-*- coding: latin1 -*-
> name = 'Martin Löwis'
>
> ?
Are you asking what is assumed about the identifier 'name', or the value
bound to that identifier? Currently, the identifier must be encoded in
latin1 in this
Bengt Richter wrote:
>>Others reject it because of semantic difficulties: how would such
>>strings behave under concatenation, if the encodings are different?
>
> I mentioned that in parts you snipped (2nd half here):
>
> This could also support s1+s2 to mean generate a concatenated string
> that
Tuvas wrote:
> A. Change a list of chars to a single string or
> B. Read a list of chars in an extention module
Either is possible, but I recommend to do A:
data = ''.join(data)
Then pass the modified data to the extension module.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/pyth
[EMAIL PROTECTED] wrote:
> That is, there are no longer any readline.so or _curses.so in lib-dynload,
> but instead they are added to Python's shared library dependencies.
What is "they" in that sentence? readline.so and _curses.so? I very much
doubt that - more likely, libreadline.so and libncu
[EMAIL PROTECTED] wrote:
> Well, I implied that _curses.so and readline.so disappeared as one
> would expect, dependencies on libncurses.so and libreadline.so instead
> showing up in Python itself. It's very strange that this happens with
> ncurses and readline, when both db and Tcl/Tk got linked i
[EMAIL PROTECTED] wrote:
> What do you mean? A static-only build does somehow exclude that I had
> static libraries before?
No, it doesn't. I misunderstood. It is quite unclear still what you had
been doing: e.g. did you have shared versions of db and Tcl or not?
Did you have linker scripts in pla
Dan M wrote:
> /usr/include/sys/event.h:53: error: syntax error before "u_int"
> /usr/include/sys/event.h:55: error: syntax error before "u_short"
> *** Error code 1
>
> Stop in /usr/local/src/Python-2.4.2.
>
> immediately upon running "make". I took at look at event.h to see if I
> could find an
Jim wrote:
> My understanding is that I am supposed to be able to urlencode anything
> up to the top half of latin-1 -- decimal 128-255.
I believe your understanding is incorrect. Without being able to quote
RFCs precisely, I think your understanding should be this:
- the URL literal syntax only
Chris wrote:
> Wonder if anyone can help me?
I very much doubt that, with as little information you gave us.
> I am trying to run a perl script but I keep getting this error:
>
> /usr/lib/python2.4/posixfile.py:59: DeprecationWarning: The posixfile
> module is obsolete and will disappear in the
Fcamattti wrote:
> Hello for everybody
>
> So I have a doubt. I'd like to know what do you think about the joint
> of efforts of Sun Microsystems and the Google to create a office web
> based. I sincerely enjoy the idea althoug I'd like to know what will be
> the future of this wonderful lang
James Colannino wrote:
> I discovered the solution and thought I'd share it with everyone. I
> discovered as I googled that Python used to have a function called
> atoi() that took the parameter base=X. I decided to see if that worked
> with the newer function int() and it did :)
I recommend
James Colannino wrote:
> Ok, so further research revealed that 0600 is actually the octal
> representation for 384 (which makes sense.) So then, I guess my
> question would have to be, is there a way for me to make Python aware
> that the 0600 I'm passing to int() is octal and not decimal so th
28tommy wrote:
> I'm trying to automate an installation of some SW that is installed on
> Windows (you know - 'Start' ==> 'Next' ==> 'Next' ==> 'Finish' kind of
> installation). Is ther any way to perform that using python?
While that is possible in Python, it is very tedious to do: you
essential
Ron wrote:
> Surprising to myself, this was all that it took to make this work. So I'm
> not sure why this method was left out. Could it have been an oversight?
It could be an oversight. More likely, it was not originally there when
the underlying tix library was developed, and only added to t
Philippe C. Martin wrote:
>>My mistake: The makefile (as written in the readme!) looks for bzip 1.0.2
>>
>
> PS: since bzip.org does not have 1.0.2 source anymore, can I just rename
> 1.0.3 ?
That should work; alternatively, you can change the project file.
Regards,
Martin
--
http://mail.python
Xiao Jianfeng wrote:
> self.assertEquals(result, expected)
> AssertionError: '-0' != '0'
>
> Can somebody tell me what's the problem ?
It looks like there is some minor bug in the floating
point libraries of your operating system: Python expects
that the strings for both numbers are the same in t
thakadu wrote:
> So it seems I am forced to use the bsddb185 module
> which does not have convenient record level methods.
> Am I missing something here or have others eperienced
> tha same?
I think you are missing that bsddb185 implements the
dictionary interface. So you can use [key] to access
t
Roy Smith wrote:
> Is there any way to access the RFC 3542 defined macros such as
> ICMP6_FILTER_SETPASSALL() from within the socket module?
No. Not sure it would belong into the socket module, though:
an icmp module could be developed independently from the socket
module if needed.
Regards,
Ma
Simon Burton wrote:
> I'm having some trouble linking one extension module to another because
> the linker expects a "lib" prefix and my python modules cannot have
> this prefix.
This is a Good Thing (tm) :-) Don't link extension modules to each
other; this is really asking for trouble. Instead, c
Shi Mu wrote:
> I run the following code and got wrong message, but I still want to
> make [1,2],[4,3] and [6,9] to be keys of the dictionary or change the
> style a little bit. How to do that?
Make them tuples:
>>> p=[[1,2],[4,3],[6,9]]
>>> n=dict([(tuple(x),[]) for x in p])
>>> n
{(6, 9): [
thakadu wrote:
> It seems it doesnt implement ALL of the dictionary interface though.
> dir({}) yields many more methods than dir(bsddb185.open(f)).
> So bsddb185 is missing many of the methods that I am used
> to in bsddb. I mentioned some above that are missing, pop()
> in particular would be use
[EMAIL PROTECTED] wrote:
> I have C Extension classes distributed across several modules with
> non-trivial interdependancies. I guess you are saying I should have
> these in backend libraries and then put the module specific functions
> in the module itself. It's going to be tricky because I am us
SPE - Stani's Python Editor wrote:
> Is there any way for these kind of installers to be used with cygwin.
No. The bdist_wininst packages link against Microsoft's C library;
the cygwin Python against Cygwin's.
If there is no native code in the package, it would be possible to
*use* them - install
Thomas W wrote:
> Hmmm ... any hints?
I think gettext needs environment variables (e.g. LANG)
to be set.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
thakadu wrote:
> However the line:
> del db[key]
> results in an error: (1, 'Operation not permitted')
> (only tested on Python 2.3.5)
Did you open the dbm file for read-write? This should work,
and is implemented.
> Could this be because the .del() method of the dictionary
> has not been impleme
Paul Watson wrote:
> Any ideas why ./Modules/cjkcodecs/_codecs_cn.c fails to compile? It
> appears that the CODEC_STATELESS macro is concatenating 'hz' with a
> number and text.
More likely, hz is already defined to be 100, then forming 100_encode.
It would be best if you could find out what A
Paul Watson wrote:
> This is on AIX 4.3.3
>
> $ grep -i _hz $(find . -name m_param.h)
> #define _HZ 100/* ticks per second of the clock*/
> #define __hzHZ /* Berkeley uses lower case hz */
> #define HZ _HZ
> #define hz __hz
I expected to see something li
Paul Watson wrote:
> Can we #undef _ALL_SOURCE for _codecs_cn.c compilation?
Where does _ALL_SOURCE come from? Why is it defined?
What is its effect on hz?
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Carl Waldbieser wrote:
> Has anyone had any experience embedding a CPython engine in a .NET
> application? In the COM/ActiveX world, it was pretty easy to use Mark
> Hammond's win32 modules to create a script engine component that you could
> expose other COM objects to, but I was not sure how I w
Christoph Zwerschke wrote:
> Anyway, I was thinking about whether it would be possible and desirable
> to change the old behavior in future Python versions and let dict.keys()
> and dict.values() both return sets instead of lists.
You answer the question whether it would be possible (no, because
Paul Watson wrote:
> It appears that _ALL_SOURCE gets defined in the /usr/include/standards.h
> file. If we could #define _ANSI_C_SOURCE or _POSIX_SOURCE, it appears
> that it would eleminate _ALL_SOURCE.
Ah, ok - this should be easy enough. Python would normally define
_POSIX_SOURCE (through _
Paul Watson wrote:
> I also note that compiles occurring after the complaint about not
> finding Tcl/Tk do not appear to get the OPT= setting I specified on the
> 'make' command line. It starts with compilation of structmodule.c and
> includes the _codecs_??.c files. Does this have any signifi
Christoph Zwerschke wrote:
> I know. But this does not answer the question: If the keys *are* already
> a set according to their semantics, why aren't they returned as a set
> from the beginning?
Notice that this was not the question you originally asked. This
one has a clear answer: because tha
Christoph Zwerschke wrote:
> Sorry. Your answer was good; I missed the point and thought you wrote
> set(d.keys()). Is it documented anywhere that set(d) = set(d.keys())? I
> think this should go into the Python Doco where keys() are explained.
It follows from what is documented. set() creates a
Mike Meyer wrote:
>>I trusted the doco which defines a set as "an unordered collection of
>>immutable values" (http://docs.python.org/lib/types-set.html).
>
>
> If the hash changes, you've screwed up the set. What it really should
> say is "collection of objects with fixed hashes", or words to th
Christoph Zwerschke wrote:
> You need to know a third thing, namely that as an iterable object, a
> dictionary returns the keys only, not the key/value tuples which would
> also make some sense. If it had been designed that way, you could write
Right. I forgot to say that, but that is also expla
Mike Meyer wrote:
> I would have phrased it as "identical" instead of equal. Sets should
> hold unique elements, where "unique" depends on the use at hand. For
> some uses, "==" might be appropriate. For others, "is" might be
> appropriate.
Sets, as currently defined, require hashable objects, i.e
mojosam wrote:
> How do I decide on a license?
If you want to look at this from a legal point of view,
I highly recommend reading Larry Rosen's book, Open Source
Licensing. It covers issue you would never have thought
of without studying law, and gives good advice (IMHO).
Regards,
Martin
--
htt
[EMAIL PROTECTED] wrote:
> It seems like functions such as xml.sax.saxutils.escape and unescape
> are generally useful, and not at all tied to the xml.sax module. Would
> it make sense to move them somewhere else, like to xml?
Moving it would be a bad idea. Exposing it elsewhere would be useful.
Mike Meyer wrote:
>>class mylist1(list):
>> def __hash__(self): return 0815
>>
>>class mylist2(list):
>> def __hash__(self): return id(self)
>>
>>In the case of mylist1, everything is ok including semantics, but
>>performance suffers dramatically. In mylist2, performance is great,
>>but sem
Christoph Zwerschke wrote:
>> This is not true. The second definition of __hash__ does not meet
>> the specifications:
>> "The only required property is that objects which compare equal have the
>> same hash value"
>
>
> As Mike has written in his last posting, you could easily "fix" that by
> t
Mike Meyer wrote:
>>This is not true. The second definition of __hash__ does not meet
>>the specifications:
>
>
> The specification isn't on the __hash__ method, but on objects.
What does it mean for a specification to be "on" something? The
specification I quoted is listed "under" the __hash__
Mike Meyer wrote:
> Personally, I think we'd be better off to come up with a term for this
> property that doesn't have a commonly understood meaning that has such
> broad areas of disagreement with the property. I've been using
> "hashable", which I would currently define as "has a __hash__ method
Christoph Zwerschke wrote:
> Anyway, the original question was: Are mylist1 and mylist2 (as above) to
> be considered "hashable" types or not?
I long forgot was the original question was (I thought it was
"Why is dictionary.keys() a list and not a set?" :-); anyway,
the answer to this question is
Mike Meyer wrote:
>>>Personally, I think we'd be better off to come up with a term for this
>>>property that doesn't have a commonly understood meaning that has such
>>>broad areas of disagreement with the property. I've been using
>>>"hashable", which I would currently define as "has a __hash__ me
Fuzzyman wrote:
> Criticism solicited (honestly) :-)
A couple of minor points:
- I would drop 2.2 compatibility
- self=self isn't needed in the functions, because of
nested scopes
- popitem(self) can be rewritten as
def popitem(self):
try:
key = self._sequence.pop()
Todd Greenwood-Geer wrote:
> Q: Do I have to be a member of some sort of secret society in order to
> be listed in the 'local recipient table'?
Ah, you don't know about the PSU :-?
Seriously, please report a bug at sf.net/projects/pypi. Unfortunately,
the (single) cheeseshop maintainer is overwor
Fuzzyman wrote:
>>- One problem with the FancyDict is that it allows
>> d.keys.append(100)
>
>
> Are you sure ?
Not at all. This was from inspection only; I propably
misinterpreted the code.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Scott David Daniels wrote:
> In reading over the source for CPython's PyUnicode_EncodeDecimal,
> I see a dance to handle characters which are neither dec-equiv nor
> in Latin-1. Does anyone know about the intent of such a conversion?
To support this:
>>> int(u"\N{DEVANAGARI DIGIT SEVEN}")
7
>
Tony Meyer wrote:
> Is this the intended behaviour?
Sort-of. os.rename invokes the C library's rename, and does whatever
this does. It is expected that most platform's C libraries do what
the documentation says rename does, but platforms may vary in their
implementation of the C library, and from
Tony Meyer wrote:
> Thanks for that. In your opinion, would a documentation patch that
> explained that this would occur on Windows (after the existing note
> about the Windows rename not being atomic) be acceptable?
In principle, yes. We cannot do that for every platform, of course,
but it p
Scott David Daniels wrote:
>> >>> int(u"\N{DEVANAGARI DIGIT SEVEN}")
>> 7
>
> OK, That much I have handled. I am fiddling with direct-to-number
> conversions and wondering about cases like
>>>> int(u"\N{DEVANAGARI DIGIT SEVEN}" + XXX
>+ u"\N{DEVANAGARI DIGIT SEVEN}")
int() passe
Robert McLay wrote:
> I have been trying to build python on Cray X1. As far as I can
> tell it does not support dynamic loading. So the question is:
>
>How to build 2.4 without dynamic loading?
Make sure HAVE_DYNAMIC_LOADING isn't defined; configure should detect
this automatically.
> That
Martin P. Hellwig wrote:
> From what I can remember is that they used an algorithm to create some
> statistics of the specific page and compared that with statistic about
> all kinds of languages and encodings and just mapped the most likely.
More hearsay: I believe language-based heuristics ar
Diez B. Roggisch wrote:
> So cp1250 doesn't have all codepoints defined - but the others have.
> Sure, this helps you to eliminate 1 of the three choices the OP wanted
> to choose between - but how many texts you have that have a 129 in them?
For the iso8859 ones, you should assume that the char
smurphus wrote:
> Any suggestions on how I can remedy this?
It would be good if you could try to understand and to
analyse these error messages; your message does not
indicate whether you have knowledge of the C language
and could analyse them or not.
For example, it is very puzzling that there i
smurphus wrote:
> I hope that information is of some use. Not sure where to go from
> here.
Please try
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
-mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I.
-I./Include -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o
Modules/posixm
Bugs wrote:
> I believe I read in a relatively recent thread that the reason
> python24.dll is so large compared to previous releases is that all the
> language encodings are linked into the library?
Not only that (but also). In addition, it also contains modules that
were previously implemented
utabintarbo wrote:
> Fredrik, you are a God! Thank You^3. I am unworthy
>
> I believe that may do the trick. Here is the results of running your
> code:
For all those who followed this thread, here is some more explanation:
Apparently, utabintarbo managed to get U+2592 (MEDIUM SHADE, a filled
5
Tom Anderson wrote:
> Isn't the key thing that Windows is applying a non-roundtrippable
> character encoding?
This is a fact, but it is not a key thing. Of course Windows is
applying a non-roundtrippable character encoding. What else could it
do?
> Windows, however, maps that name to the
> 8-bi
Tom Anderson wrote:
>> This is a fact, but it is not a key thing. Of course Windows is
>> applying a non-roundtrippable character encoding. What else could it do?
>
>
> Well, i'm no great thinker, but i'd say that errors should never pass
> silently, and that in the face of ambiguity, one shoul
[EMAIL PROTECTED] wrote:
Does anyone know how I can use "icl" (Intel C++) to compile C
extensions? I'm on Windows, and my Python is compiled using VS7.1
(binary distribution). Right now, when I run setup.py install, it uses
cl.exe (MSVC++ Toolkit 2003), and I would like to use icl because
MSVC++ 20
Torsten Mohr wrote:
Geht sowas auch in Python?
Nicht direkt. Es ist Ãblich, dass Funktionen, die Ergebnisse
(RÃckgabewerte) liefern, dies mittels return tun:
def vokale(string):
result = [c for c in string if c in "aeiou"]
return "".join(result)
x = "Hallo, Welt"
x = vokale(x)
Falls man meh
[EMAIL PROTECTED] wrote:
I am trying to locate a windows binary of a recent python (2.4
preferred, but not essential) with support for Unicode characters
with values greater than 0x1. I have tested the python.org
binaries and those from Activestate, both give me a traceback on
unichr(0x1) a
Ricardo Bugalho wrote:
thanks for the information. But what I was really looking for was
informaion on when and why Python started doing it (previously, it always
used sys.getdefaultencoding())) and why it was done only for 'print' when
stdout is a terminal instead of always.
It does that since 2.
Rickard Lind wrote:
Is there any way to build the python executable statically and
still be able to load modules built as shared libraries?
I'm not what "build statically" means; if you talking about
building a statically linked interpreter binary - then no,
this is not possible. At a minimum, you
Mark McEahern wrote:
It doesn't appear so. A workaround, of course, is to create a new file
with the subset of files from the old file:
That is actually the *only* way to do that. tarfiles cannot be "sparse",
in the sense that parts of the file can be marked as deleted. So in
order to delete a fi
Torsten Mohr wrote:
is there some string class that i can change in place,
like perls strings?
array.array is mutable. You can use the 'c' code if
you want an array of characters.
Is it possible to do some regex replacement functions
that would even change its length?
You can't use re.sub array, bu
Torsten Mohr wrote:
reading the documentation (and also from a hint from this NG)
i know now that there are some types that are not mutable.
But why is it this way?
There are various reasons, some apply for some types, and
some for others:
- immutable objects are hashable - their hash value will no
Rickard Lind wrote:
I'll be more specific: when I build python 2.3.4 on FreeBSD 4.9,
the interpreter binary is linked against three shared libraries:
libutil.so.3, libm.so.2 and libc_r.so.4. Now, these libraries are
not present on the TARGET system (which is distinct from the build
system, but bas
Also sprach Jürgen Exner:
> Xah Lee wrote:
>> © %a = ('john',3, 'mary', 4, 'jane', 5, 'vicky',7);
>> © use Data::Dumper qw(Dumper);
>> © print Dumper \%a;
>
> Wow, my compliments. The very first time that using Data::Dumper actually
> may do something useful (formats the data more nicely). Still
Luis P. Mendes wrote:
I get the following result:
http://www..";>
~
Most likely, this result is correct, and your document
really does contain
I don't get any elements. But, if I access the same url via a browser,
the result in the browser window is something like
Paul Rubin wrote:
Some countries have laws about cryptography software (against some
combination of export, import, or use). The Python maintainers didn't
want to deal with imagined legal hassles that might develop from
including good crypto functions in the distribution. Then it became
obvious t
Luis P. Mendes wrote:
with:DataSetNode = stringNode.childNodes[0]
print DataSetNode.toxml()
I get:
~
~439
~
___-
so far so good, but when I issue the command:
print D
Irmen de Jong wrote:
The unescaping is usually done for you by the xml parser that you use.
Usually, but not in this case. If you have a text that looks like
XML, and you want to put it into an XML element, the XML file uses
< and >. The XML parser unescapes that as < and >. However, it
does not th
Irmen de Jong wrote:
Usually, but not in this case. If you have a text that looks like
XML, and you want to put it into an XML element, the XML file uses
< and >. The XML parser unescapes that as < and >. However, it
does not then consider the < and > as markup, and it shouldn't.
That's also what
301 - 400 of 2482 matches
Mail list logo