I'm happy to announce that ActivePython 2.6.0.0 is now
available for download from:
http://www.activestate.com/Products/activepython/
ActivePython 2.6.0.0 is based on Python 2.6.0.
What is ActivePython?
-
ActivePython is ActiveState's binary distribution of Python.
En Tue, 11 Nov 2008 09:29:44 -0200, Stef Mientki [EMAIL PROTECTED]
escribió:
On Tue, Nov 11, 2008 at 8:46 AM, Markus Mayer [EMAIL PROTECTED] wrote:
I'm new to python and have a slight problem importing - or maybe
understanding - modules. I'm writing a GUI application using Qt4 and
wanted to
On Nov 15, 12:51 am, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Fri, 14 Nov 2008 22:56:52 -0500, Terry Reedy wrote:
snip
I would say that the answer to this is, Would you like to include
behaviour in value?. Let me give you an example:
class String(string):
def
Duck typing...
For a while I thought the word _duck_ was used in the sense of _dodge_.
--
Arnaud
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 15 Nov 2008 20:00:03 +1300, greg wrote:
Joe Strout wrote:
So, in this case, the simplest solution was to have the method that
initially accepts and stores the data check to make sure that data
satisfies the assumptions of the class.
In hindsight, yes, but the trouble is that you
On Thu, 13 Nov 2008 02:16:32 -0800, Chris Rebert wrote:
On Thu, Nov 13, 2008 at 2:07 AM, TP [EMAIL PROTECTED]
wrote:
In the following example, is this possible to affect the two iterators
to escape the two loops once one j has been printed:
Non-exception alternative:
done = False
for i
I'm collecting together a bunch of fairly random useful functions I have
written over the years into a module. Generally speaking is it best to
a) Import all the other modules these functions depend on into the
modules global namespace by putting them at the top of the module or
should I...
b)
r0g [EMAIL PROTECTED] writes:
I'm collecting together a bunch of fairly random useful functions I have
written over the years into a module. Generally speaking is it best to
a) Import all the other modules these functions depend on into the
modules global namespace by putting them at the top
En Fri, 14 Nov 2008 18:21:17 -0200, Pekeika
[EMAIL PROTECTED] escribió:
Good morning group,
When I open my Python window, this is appearing instead of the command
line . (I'm somehow new to Python).
File boot_com_servers.py, line 21, in module
File
This is such a fascinating and compelling thread that it has pulled me
out of lurker mode.
Eric, I would like to say I also admire your initiative, but even more
so your patience. You seem to handle comments of all types
gracefully.
Perhaps it comes from working with speech recognition so much.
Hi Friends,
Is there any way we can redirect graphical output to some file
What i require is to run a test for my function but it involves dialog boxes
but a test shld be run without user intervention :(
import sys
import dialog
import wx
app = wx.PySimpleApp()
sys.stdout =
Hi people!
I want to compile the Java Python Extension which I downloaded through
CVS http://jpe.cvs.sourceforge.net/jpe/;
Building JPE by bootstrapping the makefile system with the cmd:
python makefile.py
from the top source directory.
I receive the following error message:
working in
Hunter wrote:
We are reviewing a vendor who will output some data in an XML format.
I will then use python to convert the data to another format for
upload to another vendor.
Take a look at lxml.objectify, it has a nicer API, especially if you are new
to XML. It also handles loads of namespace
Hello All,
Why is python designed so that b and c (according to code below)
actually share the same list object? It seems more natural to me that
each object would be created with a new list object in the points
variable.
class Blob:
def __init__(self, points=[]):
self._points =
Rick Giuly [EMAIL PROTECTED] writes:
Hello All,
Hello,
Why is python designed so that b and c (according to code below)
actually share the same list object? It seems more natural to me that
each object would be created with a new list object in the points
variable.
class Blob:
def
r0g:
a) Import all the other modules these functions depend on into the
modules global namespace by putting them at the top of the module or
should I...
b) Include them in each function individually.
This is a interesting topic, that requires some care.
Generally I suggest you put them at the
En Sat, 15 Nov 2008 07:27:47 -0200, Indian [EMAIL PROTECTED]
escribió:
Is there any way we can redirect graphical output to some file
What i require is to run a test for my function but it involves dialog
boxes
but a test shld be run without user intervention :(
import sys
import dialog
[EMAIL PROTECTED] writes:
I have yet to see any reasonable definition of a Python
value in the Python docs or elsewhere, despite the fact
that a value is one of the three defining characteristics
of an object, a central concept in Python.
I don't remember how the expression 'object value' is
On 15 Nov, 01:02, Brendan Miller [EMAIL PROTECTED] wrote:
On Thu, Nov 13, 2008 at 3:54 AM, James Harris
[EMAIL PROTECTED] wrote:
On 11 Nov, 22:59, Brendan Miller [EMAIL PROTECTED] wrote:
What would heavy python unit testers say is the best framework?
I've seen a few mentions that maybe
En Sat, 15 Nov 2008 07:27:47 -0200, Indian [EMAIL PROTECTED]
escribió: ...(I don't get what the above code is supposed to perform)
You're right, unit tests should run without user intervention. So in
principle, the function being tested should not call a dialog box
directly. There are several
The Python computer language.
Language: English
--
http://mail.python.org/mailman/listinfo/python-list
Language:English
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
r0g:
a) Import all the other modules these functions depend on into the
modules global namespace by putting them at the top of the module or
should I...
b) Include them in each function individually.
This is a interesting topic, that requires some care.
Generally
On 11 Nov., 23:59, Brendan Miller [EMAIL PROTECTED] wrote:
What would heavy python unit testers say is the best framework?
I've seen a few mentions that maybe the built in unittest framework
isn't that great.
The UT frameworks follow the same principles and are all alike more or
less. Of
On Nov 14, 9:01 pm, Eric S. Johansson [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
I don't understand. If you don't want to terminate the if, why do
you hit backspace? What is it that you would like to have happen?
the goal is to make some aspects of indentation behave the same
On Fri, 14 Nov 2008 17:39:00 +0100, Martin v. Löwis
[EMAIL PROTECTED] wrote:
Can you first please report what happened when you add the print statement?
Thanks guys, I found how to handle this:
===
for id in rows:
#Says Unicode, but it's actually not
#print type(id[1])
Hello
I fill two dictionaries with the same number of keys, and then need to
compare the value for each key, eg.
#Pour chaque APE, comparaison societe.ape.nombre et verif.ape.nombre
import apsw
#
dic1={}
[...]
rows=list(cursor.execute(sql))
for id in rows:
dic1[id[0]] =
http://bux.to/?r=mr-sk8er
At Bux.to, you get paid to click on ads and visit websites. The
process is easy! You simply click a link and view a website for 30
seconds to earn money. You can earn even more by Referring Friends.
You'll get paid $0.01 for each website you personally view and $0.01
for
Gilles Ganault:
I fill two dictionaries with the same number of keys, and then need to
compare the value for each key, eg.
Probably using the DBMS capabilities you can find a better solution.
Are the keys equal? If you want to do it using dicts, you can iterate
on one dict, with iteritems, and
Hi,
I've never used exception before, but I think now it's time to start.
I've seen that there is a list of the built-in exceptions in the
Python docs, but this explains the meaning of every exception. Does
exist an inverted list? I mean, how may I know what kind of exception
is going to raise
On Nov 15, 2:50 am, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
I wonder whether the best solution is to include all your type checks
(isinstance or duck-typing) in the unit tests, so you can avoid paying
the cost of those tests at runtime? If your code passes the unit tests,
Gilles Ganault [EMAIL PROTECTED] writes:
Hello
I fill two dictionaries with the same number of keys, and then need to
compare the value for each key, eg.
#Pour chaque APE, comparaison societe.ape.nombre et verif.ape.nombre
import apsw
#
dic1={}
[...]
Mr.SpOOn [EMAIL PROTECTED] writes:
Hi,
I've never used exception before, but I think now it's time to start.
I've seen that there is a list of the built-in exceptions in the
Python docs, but this explains the meaning of every exception. Does
exist an inverted list? I mean, how may I know
Mr.SpOOn:
try:
m = re.match('[1-9]$', my_string)
except:
print 'something...'
...
try:
m.group()
except:
print 'error...'
Generally don't write a nude except, use qualified exceptions, that is
put there one of more exceptions that you want to catch (be careful
with the
Wow, thanks everybody! There's a lot to learn for me from these examples...
Enjoy your weekend!
Florian
Florian Brucker wrote:
Hi everybody!
Given a dictionary, I want to create a clustered version of it,
collecting keys that have the same value:
d = {'a':1, 'b':2, 'c':1, 'd':1, 'e':2,
On Sat, 15 Nov 2008 14:12:42 +0100, Gilles Ganault wrote:
On Fri, 14 Nov 2008 17:39:00 +0100, Martin v. Löwis
[EMAIL PROTECTED] wrote:
Can you first please report what happened when you add the print
statement?
Thanks guys, I found how to handle this:
===
for id in rows:
Thank you all for the insightful replies! Much appreciated!
Manu
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Nov 15, 2008 at 4:33 AM, Tamer Higazi [EMAIL PROTECTED] wrote:
Hi people!
I want to compile the Java Python Extension which I downloaded through
CVS http://jpe.cvs.sourceforge.net/jpe/;
Building JPE by bootstrapping the makefile system with the cmd:
python makefile.py
from the
TZMud is a Python MUD server.
http://tzmud.googlecode.com/
A MUD is a text-based virtual environment
accessed via telnet, or with a specialised
MUD client.
TZMud development is still in early stages,
focusing on API and server stability.
TZMud uses several high-quality Python
libraries to
[EMAIL PROTECTED] wrote:
r0g:
a) Import all the other modules these functions depend on into the
modules global namespace by putting them at the top of the module or
should I...
b) Include them in each function individually.
This is a interesting topic, that requires some care.
Generally I
Arnaud Delobelle wrote:
Gilles Ganault [EMAIL PROTECTED] writes:
Hello
I fill two dictionaries with the same number of keys, and then need to
compare the value for each key, ...
if you know set(dic1) == set(dic2) -- that is that the same keys are
used, you could use:
Setup:
dic1 =
Hello,
I was playing around a bit with generators using next() and send(). And
I was wondering why an extra send() method was introduced instead of
simply allowing an argument for next().
Also, I find it a bit counter-intuitive that send(42) not only sets
the generator to the specified
Scott David Daniels [EMAIL PROTECTED] writes:
Arnaud Delobelle wrote:
Gilles Ganault [EMAIL PROTECTED] writes:
Hello
I fill two dictionaries with the same number of keys, and then need to
compare the value for each key, ...
if you know set(dic1) == set(dic2) -- that is that the same keys
Thomas Mlynarczyk [EMAIL PROTECTED] writes:
Hello,
I was playing around a bit with generators using next() and
send(). And I was wondering why an extra send() method was introduced
instead of simply allowing an argument for next().
Also, I find it a bit counter-intuitive that send(42) not
Arnaud Delobelle [EMAIL PROTECTED] writes:
Or to obtain a dictionary of differences:
dict((k, (v, dic2[v]) for k, v in dic1.iteritems()
if dic2[v] != v)
^
Should be k of course!
--
Arnaud
--
On Nov 14, 8:56 pm, Terry Reedy [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
On Nov 13, 4:53 pm, Terry Reedy wrote:
[EMAIL PROTECTED] wrote:
I have yet to see any reasonable definition of a Python
value in the Python docs or elsewhere, despite the fact
that a value is one of the three
len wrote:
On Nov 13, 7:32 pm, Ethan Furman [EMAIL PROTECTED] wrote:
len wrote:
Hi all;
[snip]
Here is my problem. I need to start doing this in the really world at
my company converting some older cobol system and data to python
programs and MySQL. I have gotten past packed decimal
The costrunction of a chord is based on a root note and a structure,
so by default, giving just a note, it creates a major chord adding the
third and fifth note.
Quite some time ago I wrote something to solve the reverse problem:
given a list of note names, find out a chord name.
On Nov 15, 9:08 pm, [EMAIL PROTECTED] wrote:
I also put a comment after each import, with the name of the function/
class it is used into:
import foo # used by baz()
import bar # used by spam()
Why bother with the ()? Why bother at all? Surely this rapidly becomes
tedious clutter:
import
I really don't understand, what's happening with the following code.
Am I doing something wrong?
#!/usr/bin/python
class EnumeratedContent:
def __init__(self, values = []):
self.values_ = values
def values(self):
return self.values_
def
On 15Nov2008 22:41, Filip Gruszczyński [EMAIL PROTECTED] wrote:
| I really don't understand, what's happening with the following code.
| Am I doing something wrong?
Yes. This is a common mistake:
| class EnumeratedContent:
| def __init__(self, values = []):
| self.values_
Every day something new. Thanks a lot :)
2008/11/15 Cameron Simpson [EMAIL PROTECTED]:
On 15Nov2008 22:41, Filip Gruszczyński [EMAIL PROTECTED] wrote:
| I really don't understand, what's happening with the following code.
| Am I doing something wrong?
Yes. This is a common mistake:
| class
On Nov 16, 12:12 am, Gilles Ganault [EMAIL PROTECTED] wrote:
On Fri, 14 Nov 2008 17:39:00 +0100, Martin v. Löwis
[EMAIL PROTECTED] wrote:
Can you first please report what happened when you add the print statement?
Thanks guys, I found how to handle this:
No you didn't.
===
for
r0g wrote:
The module I am compiling is kind of a scrapbook of snippets for my own
development use, it has no coherent theme and I wouldn't be distributing
it or using the whole thing in a production environment anyway, just
copying the relevant functions into a new module when needed. I'm
Robert Kern wrote:
r0g wrote:
The module I am compiling is kind of a scrapbook of snippets for my own
development use, it has no coherent theme and I wouldn't be distributing
it or using the whole thing in a production environment anyway, just
copying the relevant functions into a new module
[EMAIL PROTECTED] wrote:
On Nov 14, 8:56 pm, Terry Reedy [EMAIL PROTECTED] wrote:
First of all, thanks. Thanks to your answers I have
finally been able to formulate a concept of Python
values. Now we'll see if it is valid/usable... :-)
Good questions help refine a concept.
* Can I create
How do I fix the PP3E and PP2E errors in Programming Python 3rd Edition?
--
http://mail.python.org/mailman/listinfo/python-list
Aaron Brady wrote:
You see examples here from time to time that don't follow the rigid C+
+ formatting. Some examples:
def classmaker( ):
class X:
something
return X
class X:
class Y:
something
if something:
class X:
pass
else:
def X( ):
pass
Some
John Yeung wrote:
This is such a fascinating and compelling thread that it has pulled me
out of lurker mode.
Eric, I would like to say I also admire your initiative, but even more
so your patience. You seem to handle comments of all types
gracefully.
Should have seen me 20 years ago.
[EMAIL PROTECTED] wrote:
I still don't understand.
I elaborated on some of these points in a post to Aaron Brady. If you missed it
on the list, let me know and I will forward you a copy.
It seems that you want to be able to do:
END_CLASS to end the current class.
END_DEF to end the
On Sat, 15 Nov 2008 01:40:04 -0800, Rick Giuly wrote:
Hello All,
Why is python designed so that b and c (according to code below)
actually share the same list object? It seems more natural to me that
each object would be created with a new list object in the points
variable.
That's not
On Sat, 15 Nov 2008 16:37:34 -0800, ryan payton wrote:
How do I fix the PP3E and PP2E errors in Programming Python 3rd Edition?
Liquid Paper?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 15, 4:12 pm, Terry Reedy [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
On Nov 14, 8:56 pm, Terry Reedy [EMAIL PROTECTED] wrote:
...snip...
* Does an object's behavior (methods) affect
its value?
My first answer is No. Instance methods are attributes of a class and,
in most
[Tried multiple times to post this but Google errors
out so will try posting in two parts... this is part 1]
On Nov 14, 11:51 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Fri, 14 Nov 2008 22:56:52 -0500, Terry Reedy wrote:
[EMAIL PROTECTED] wrote:
On Nov 13, 4:53 pm,
[Tried multiple times to post this but Google errors
out so will try posting in two parts... this is part 2]
On Nov 14, 11:51 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Fri, 14 Nov 2008 22:56:52 -0500, Terry Reedy wrote:
[EMAIL PROTECTED] wrote:
On Nov 13, 4:53 pm, Terry
Jeffrey Barish [EMAIL PROTECTED] writes:
[EMAIL PROTECTED] wrote:
Jeffrey With the release of multiprocessing in Python 2.6, is there
any Jeffrey reason to use Pyro or RPyC?
As far as I know the multiprocessing module only works on one machine
(multi-cpu or multi-core), not
Hi,
I am trying to understand the following line:
# a is an integer array
max([(sum(a[j:i]), (j,i))
Can you please tell me what that means,
I think sum(a[j:i] means find the some from a[j] to a[i]
But what is the meaning of the part (j,i)?
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Nov 15, 2008 at 8:41 PM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Hi,
I am trying to understand the following line:
# a is an integer array
max([(sum(a[j:i]), (j,i))
This code isn't valid. You have a [ with no closing ].
Cheers,
Chris
--
Follow the path of the Iguana...
Pyspread 0.0.10 has finally been released.
About:
--
Pyspread is a 3D spreadsheet application. Each cell accepts a Python
expression and returns an accessible object. Python modules are usable
from the spreadsheet table without external scripts.
Changes:
+ Code completely
On Nov 16, 3:41 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Hi,
I am trying to understand the following line:
# a is an integer array
max([(sum(a[j:i]), (j,i))
Can you please tell me what that means,
I think sum(a[j:i] means find the some from a[j] to a[i]
But what is the meaning of
This is the full source code:
def A(w, v, i,j):
if i == 0 or j == 0: return 0
if w[i-1] j: return A(w, v, i-1, j)
if w[i-1] = j: return max(A(w,v, i-1, j), v[i-1] + A(w,v, i-1, j - w[i-1]))
I am reading this blog
http://20bits.com/articles/introduction-to-dynamic-programming/
On
On Nov 15, 3:40 am, Rick Giuly [EMAIL PROTECTED] wrote:
Hello All,
Why is python designed so that b and c (according to code below)
actually share the same list object? It seems more natural to me that
each object would be created with a new list object in the points
variable.
class Blob:
See below.
On Nov 15, 11:15 pm, Meryl Silverburgh [EMAIL PROTECTED]
wrote:
This is the full source code:
def A(w, v, i,j):
if i == 0 or j == 0: return 0
if w[i-1] j: return A(w, v, i-1, j)
if w[i-1] = j: return max(A(w,v, i-1, j), v[i-1] + A(w,v, i-1, j -
w[i-1]))
I am
On Sat, 15 Nov 2008 11:17:07 -0800, rurpy wrote:
* Can I create an object that has a value that
is the same as int(3) without somehow using an int(3) object in its
construction?
[...]
Yes: mpz(3) where mpz is multi-precision int class with same set of
possible values as Python ints.
The
I'm trying to create PNG files to use in menus for authoring DVDs. As you
may know, these menus are only allowed to have limited numbers of colours.
Ideally I'd like to create a PNG file with just two bits per pixel, with
four colour-table entries of my choice. I'm using PyCairo
In message [EMAIL PROTECTED], Mr.SpOOn
wrote:
C 9 is a base chord plus a the ninth note, but this implies the
presence of the seventh too, so it results in: C E G B D
I don't recall such meanings in the chord names I came across. If you wanted
both a seventh and ninth, you had to say so: C7+9
In message [EMAIL PROTECTED], Larry Bates
wrote:
Lawrence D'Oliveiro wrote:
In message [EMAIL PROTECTED], Steve
Holden wrote:
Lawrence D'Oliveiro wrote:
Not to mention duck typing, which does away with the need for
inheritance altogether.
That seems a somewhat extreme point of view.
On Sat, 15 Nov 2008 21:29:22 -0800, Aaron Brady wrote:
I don't think Dennis or Steven read your post very well.
It's possible.
You said 'Why
does Python do X?', and 'It seems natural to you to do not X'. Dennis
and Steven both said, 'Python does X'.
I also disputed that it is natural to do
In message [EMAIL PROTECTED], Dennis Lee
Bieber wrote:
On Sun, 16 Nov 2008 19:21:49 +1300, Lawrence D'Oliveiro
[EMAIL PROTECTED] declaimed the following in
comp.lang.python:
In message [EMAIL PROTECTED],
Mr.SpOOn wrote:
C 9 is a base chord plus a the ninth note, but this implies the
this string from web by the Regular Expression,
−−−
href=# onClick=ConvertURL2FG('Flashget://
W0ZMQVNIR0VUXWh0dHA6Ly9tb3YuM2dwLmNuL2d1aWxpbi8yMDA4LzExLzExL3l1ZWhvdWppZmVuMDIuM2dwW0ZMQVNIR0VUXQ==233','',
233) oncontextmenu=Flashget_SetHref(this)
Steven D'Aprano [EMAIL PROTECTED] writes:
On Sat, 15 Nov 2008 01:40:04 -0800, Rick Giuly wrote:
Hello All,
Why is python designed so that b and c (according to code below)
actually share the same list object? It seems more natural to me that
each object would be created with a new list
py2exe 0.6.9 released
=
py2exe is a Python distutils extension which converts Python scripts
into executable Windows programs, able to run without requiring a
Python installation. Console and Windows (GUI) applications, Windows
NT services, exe and dll COM servers are
Bruno Desthuilliers:
What is data is another type of sequence or iterable ?-)
The original problem statement was:
Florian Brucker:
Given a dictionary, I want to create a clustered version of it, collecting
keys that have the same value: [...] Another requirement is that it should
also work on
silverburgh:
max([(sum(a[j:i]), (j,i))
Other people have already answered you so I'll add only a small note:
today the max() function has a key optional attribute, so that code
can also be written as:
max(((j, i) for ...), key=lambda (j, i): sum(a[j : i]))
I think you have copied that part
Georg Brandl [EMAIL PROTECTED] added the comment:
What good is a comparison with InstanceType for? If you want to check
whether it's an instance of a custom class, you'll have to check for
instances of new-style classes anyway. If you want to check for UserList
instances, use isinstance().
Changes by Georg Brandl [EMAIL PROTECTED]:
--
assignee: georg.brandl - loewis
nosy: +loewis
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4312
___
___
Georg Brandl [EMAIL PROTECTED] added the comment:
Thanks, fixed in r67224.
--
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4324
___
New submission from Ezio Melotti [EMAIL PROTECTED]:
With Python 2.x:
'à' in u'foo'
Traceback (most recent call last):
File stdin, line 1, in ?
TypeError: 'in string' requires string as left operand
'à' in u'xàx'
Traceback (most recent call last):
File stdin, line 1, in ?
TypeError: 'in
Mark Dickinson [EMAIL PROTECTED] added the comment:
timedelta / float or int should be disallowed in true division mode.
I don't understand this; why should the division mode affect
division operations involving timedeltas at all? The meaning
of / is unaffected by the division mode for
Mark Dickinson [EMAIL PROTECTED] added the comment:
By the way, I assume that any plan to add this division would also include
adding the inverse operation:
timedelta * float - timedelta.
It wouldn't make a whole lot of sense to have one without the other.
Mark Dickinson [EMAIL PROTECTED] added the comment:
[Christian]
float(td1) / float(td2) which is far more obvious than td1 / td2
To me, td1/td2 is more obvious that float(td1)/float(td2).
float(td) involves an arbitrary choice, to return time in *seconds*
(rather than days, or milliseconds,
STINNER Victor [EMAIL PROTECTED] added the comment:
Le Saturday 15 November 2008 04:17:50 Alexander Belopolsky, vous avez écrit :
it is really unnecessary because it can be
written as epoch + timedelta(0, seconds, microseconds).
I tried yesterday and it doesn't work!
datetime.datetime(1970,
STINNER Victor [EMAIL PROTECTED] added the comment:
Some examples to help the choice (using the last patch).
int
---
2L
print dt2 * 2
3:08:38
print dt1 - dt2 * 2
0:51:22
divmod(dt1, dt2)
(2L, datetime.timedelta(0, 3082))
print timedelta(0, 3082)
0:51:22
In 4 hours, you can watch the movie
Oleg Broytmann [EMAIL PROTECTED] added the comment:
Update the patch.
Added file: http://bugs.python.org/file12015/webbrowser.py.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2666
___
Changes by Oleg Broytmann [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file10072/webbrowser.py.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2666
___
Matthew Barnett [EMAIL PROTECTED] added the comment:
The left operand is a bytestring and the right operand is a unicode
string, so it makes sense that it raises an exception, although it would
be clearer if it said 'in string' requires unicode string as left
operand.
I agree that if it's going
Thomas Heller [EMAIL PROTECTED] added the comment:
I wonder if a patch for ctypes like this (which is not yet complete)
could be used to implement this, or MUST it be implemented in C?
The patch contains a mixin class that implements the numeric methods.
However, the actual operation takes
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
On Sat, Nov 15, 2008 at 5:08 AM, Mark Dickinson [EMAIL PROTECTED] wrote:
Mark Dickinson [EMAIL PROTECTED] added the comment:
timedelta / float or int should be disallowed in true division mode.
I don't understand this; why should
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
on Windows (with Visual Studio), mktime() also sets tm_wday only if
successful.
But negative time_t are still not allowed by the Microsoft CRT, the
tests fail.
There are workaround to this - for example python could use techniques
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
@Christian
Adding a __float__ method to datetime was entertained back in 2003, but
was rejected. The same reasons apply to timedelta:
- A C double doesn't have enough precision for roundtrip guarantees.
- Does it really need to be
1 - 100 of 112 matches
Mail list logo