try:
import name2 as target
except ImportError:
target = None
from name[, or name2 ...] [, or None] import target
translates into
try:
from name import target
except ImportError:
try:
from name2 import target
except Impor
ve a C coder a hand by
writing documentation and unit tests for the C coder. This way the C
coder can concentrate on the C code and you can enhance your unit
testing Fu. :)
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.o
s discussed two threads "Bug tracker: meaning of
resolution keywords" and "1324 bugs in the tracker" lately. I don't want
to repeat the arguments here but Brett's answer
http://permalink.gmane.org/gmane.comp.python.devel/90137 is worth reading.
Christian
_
ted).
It's not guaranteed that it will work from 2.5. The transition plan for
2to3 is:
* Get your code working under python2.6 -3 without Python 3.0
deprecation warnings
* Use 2to3 to migrate the code from 2.6 to 3.0
Christian
___
Python-Dev m
t it's the default on some platforms.
Today an user pointed out that he doesn't like the patch, too.
How should the problem be solved? In my humble opinion
long(float('nan')) should return 0L in Python 2.5.2 for b/w
compatibility and raise a ValueError or OverflowError in Python 2.6
to their existing
> setup.
It'd be nice if we can also get a bot into #python-dev to broadcast svn
commits and bug tracker changes. The Twisted guys have good bot with
decent msg coloring but IIRC it's tight into TRAC. For svn we could
probably use CIA bot and tie it into a sv
Christian Heimes wrote:
> It'd be nice if we can also get a bot into #python-dev to broadcast svn
> commits and bug tracker changes. The Twisted guys have good bot with
> decent msg coloring but IIRC it's tight into TRAC. For svn we could
> probably use CIA bot and tie it
Even a perfect patch costs several minutes of our life time. The patch
must be reviewed, applied, compiled, the entire unit test suite must
pass and finally it must be committed and the issues needs to be closed,
too.
Christian
___
Python-Dev mailin
kage into sys.path before Lib/ ?
Christian
[1] http://www.python.org/dev/peps/pep-0365/
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
d of thing to become common
> practice.
I like to give 3rd party software a chance to *extend* a name space
package like xml rather then to overwrite it. As far as I understand
your problem pyxml is overwriting the name space and claiming it for
itself rather
oint of a namespace package is to
> reserve that namespace for packages produced by a particular
> organization, similar to the way e.g. the 'org.apache.projectname'
> packages in Java work.
The initial idea behind the new packages for Python 3.0 weren't really
based on
ort.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
have an API to get the directories from the registry. Is
somebody interested in having a module for the task? I've some code for
the job on disk.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
grammer and ASDL check it out,
please?
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
m this, so I'd be
> +0 on theoretical grounds only.
Python's _winreg module and pywin32 expose several functions to get the
paths from the registry but I don't think it has a simple function like
get_mydocuments().
Christian
___
Python-Dev ma
.exposed = True
...
>>> type(Root.index)
>>> Root.index.exposed
True
>>> Root.index.exposed = False
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'instancemethod' object has no attribute
to by CSIDL_APPDATA or CSIDL_LOCAL_APPDATA.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
I've attached the first public draft of my first PEP. A working patch
against the py3k branch is available at http://bugs.python.org/issue1576
Christian
PEP: 369
Title: Lazy importing and post import hooks
Version: $Revision$
Last-Modified: $Date$
Author: Christian Heimes
Status: Draft
7;ve mentioned zope.deferredimport in my PEP. :)
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
he basic infrastructure for lazy imports.
For example imp.lazy_import("a.b.c") doesn't put "a" and "a.b" in
sys.modules. It neither doesn't cover the replacement __import__ hook
provided by Hg nor the deprecat
example")
>>> mod
>>> mod.__name__
'/tmp/example'
>>> mod.__file__
'/tmp/example.py'
>>> mod.test
23
Is it just a coincidence? Is it a desired feature? Why isn't it documented?
Christian
___
function from ShlObj.h.
It's the preferred way to get shell folder paths like CLSID_PERSONAL (my
documents). It's compatible with 2000 and newer (maybe even older, but
we don't support ME, NT4 or older) and works on Vista, too.
Christian
alone by the
> user.
It's not an issue for experienced users. For the rest we can put a link
in the start menu under Python 2.5 which opens a new explorer with the
user package directory.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
ht
I read the announcement of the Python Users list and figured out that
some of the other core developers might be interested in the news, too.
Among other projects Python was upgraded to Rung 2 on the Coverity Scan
list: http://scan.coverity.com/
Christian
Joseph Armbruster wrote:
> Christian,
>
> Is there any way you (or someone else) could post up the results? It
> looks like you need a log in to check them out.
I haven't figured out how to access the results.
Who has a login and access to the
ve access to the Python project
on their site and the project is currently under maintenance. Maybe Neal
can sheds some light on the Coverity Scan project.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/lis
a nor MyDocuments fulfill our
requirements. I don't argue for AppData, I only argue against
UserProfile as the base directory for a user package directory. I'm open
for any suggestion which doesn't violate MS' style guides.
(I don't want to imply that I like the style guide b
Brett Cannon wrote:
> I agree with Nick and Nick. This should really be two separate PEPs.
I'm fine with the proposal and I'm going to chop the PEP in two parts
tonight.
Somehow I suspect that the lazy import PEP will be postponed or rejec
on.
>
> Last run at 2007-12-27: 11 Outstanding Defects, 6 of them marked
> "uninspected",
> 3 marked "pending", and 2 marked "bug".
My dict says: rung (of a ladder)- Leitersprossen
Python has climbed up one step (or rung) of the ladder.
Do y
I've parted the former PEP as promised. Here is the post import hook.
I'll tackle the other half of the PEP later.
PEP: 369
Title: Post import hooks
Version: $Revision$
Last-Modified: $Date$
Author: Christian Heimes
Status: Draft
Type: Standards Track
Content-Type: text/x-rst
Creat
ct names so I can batch up the request.
Count me in!
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
-1 && fstat(fd, &st) == 0 && S_ISREG(st.st_mode))
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
llbacks are occurring from the import machinery. (Which
> means that the notification API should probably set the hooks entry
> to None while it's running, so that if it's called from inside a
> hook, it will not double-run the hooks, and new hooks registered
> wh
ot; is loaded:
hook1
hook2 -> registers hookX for "foo"
hookX is called directly
hook3
hook4
> An error while running the hooks should also set the hook list to None
> and discard all the hooks. There isn't any sane way to recover from an
> error in
r() notices when a new
element is appended.
In the above sample can hook_aX be called after hook_ab1 or should it be
called after hook_ab2?
> In general, if you think something in peak.util.imports isn't required,
> you're probably wrong. ;)
*g* ok. I'll check your impleme
Phillip J. Eby wrote:
> At 11:45 PM 1/10/2008 +0100, Christian Heimes wrote:
>> In my version a hook is immediately called when the the registry value
>> is set to None. When a hook is registered for a module during the
>> execution of the callback then the hook is fired d
failing
test would at least show the incorrectness.
I'm still not sure which way is the correct way in your opinion and I
hate guessing what you are trying to explain to me.
Christian
PS: I've a pending patch that queues new registrations while hooks are
processe
d one for easy tasks. May
"beginner task", "easy" or "novice level" makes a good keyword.
We could also mark complex/hard tasks, tasks which require C programming
and documentation only tasks, even though I'm not sure how useful the
additional tags would be.
: $Date$
Author: Christian Heimes
Status: Draft
Type: Standards Track
Content-Type: text/x-rst
Created: 11-Jan-2008
Python-Version: 2.6, 3.0
Post-History:
Abstract
This PEP proposes a new a per user site-packages directory to allow
users the local installation of Python packages in their
he developer role. I guess
one needs to be a coordinator to add new keywords.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
tches. It'd
stick to 2.6 because it's easy to port a 2.6 patch to 3.0, if the new
feature won't make it into 2.6.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http
Christian Heimes wrote:
> MA Lemburg has suggested a per user site-packages directory in the
> "pkgutil, pkg_resource and Python 3.0 name space packages" thread. I've
> written a short PEP about it for Python 2.6 and 3.0.
Addition:
An user has requested a new option t
sy implementable idea, at least on
Unix. Windows doesn't have getuid() and geteuid(). On the other hand
Windows doesn't have the suid bit, too.
I also tried to check if os.stat(__main__.__file__).st_uid ==
os.getuid() but the real __main__ is not available in site.py. It's
loaded and a
ailable, too. The 'site' module is imported by
Py_Initialize(). sys.argv and the real __main__ module are set much
later in Modules/main.c.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
I've uploaded a new patch:
http://bugs.python.org/issue1799
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%4
rned your request into an issue: http://bugs.python.org/issue1820
It's a feasible yet challenging task for a new CPython coder.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
htt
Guido van Rossum wrote:
> And I see no need for the new sys.flags object to be a tuple at all.
Correct. We don't need item access anymore. However the struct seq
should still be slice-able for functions like time.mktime().
Christian
___
Py
g ~/bin for Unix (including Mac) and
%APPDATA%/Python/Scripts for Windows. The Windows installer could then
add the directory to the PATH environment and install a minimal bat file
"@C:\Python26\python.exe %*" as python26.bat, too.
Christian
___
Pyth
iscussion point easy for me. I let the others decide!
:) I don't feel like wasting my time on a bike shed discussion unless
it's painted in a different color than blue. I like blue ... *g*
Christian
___
Python-Dev mailing list
Python-Dev@python
PEP.
Can I just submit the PEP or do I have to follow a procedure before I
can add it to the PEP list?
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailma
The PEP is now available at http://www.python.org/dev/peps/pep-0370/.
The reference implementation is in svn, too:
svn+ssh://[EMAIL PROTECTED]/sandbox/trunk/pep370
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org
tory or use a usercustumize.py.
* easy_install packages to the user site directory. Setuptools are not
part of the Python stdlib. I'm confident that Phil is going to add
the feature as soon as the feature is implemented for Python 2.6
What's missing?
Christian
___
while to find a reference to .local. It's part of the
FreeDesktop.Org standards:
http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/py
None
hook(module)
else:
hooks = []
sys.post_import_hook_register[name] = hooks
hooks.append(hook)
def notify_loaded(mod_or_name):
notification_in_progress = True
try:
...
finally:
notificati
Phillip J. Eby wrote:
> At 10:14 PM 1/15/2008 +0100, Christian Heimes wrote:
>> My code queues up new hooks while a sequence of hooks is processed. It
>> makes sure that hooks for a parent aren't called in the middle of a
>> child's hook chain.
>
> Noti
Bill Janssen wrote:
> Good point, but I prefer ~/Library/Python to either of these.
~/Library/ is a Mac OS X thing. I haven't seen it on other Unix systems.
I *could* add yet another environment variable PYTHONUSERHOME to set the
base path but I prefer not.
C
ring in some useful, constructive criticism
and use cases not covered by my PEP. Have you read the PEP at all?
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
h my tests. The
ref leak tests don't show a single missing reference.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
patch and explain why the implementation does all the
crazy stuff.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
ONUSERHOME?
A CC of the mail goes to the authors of setuptools, virtual python,
working env and virtual env. What's your opinion on the PEP? Do you have
some input and advice for me?
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://
-build and
> framework-build that share the same site-packages directory.
Have you read glyph's posting? He brought up some good points why Python
on Mac should use ~/.local.
Framework builds have an additional import directory in ~/Library/Python
Christian
___
to the installer, where such global issues are considered
> in a wider context" would do :)
*hehe* I love your idea.
It should be trivial to write a view lines of Python code which modify
PATH in HKCU. I'm going to write a simple example and drop it into
Tools/scripts/.
Christian
roblems. For example the user can use
the -E flag or set up sudo to ignore the environment.
The uid and gid tests aren't really required. They just provide an extra
safety net if a user forgets to add the -s flag to a suid app.
Christian
Tim Golden wrote:
> Christian Heimes wrote:
>> I'll justify why I view Python as a roaming app. All
>> company and university Linux boxes I've used in the past had exported
>> $HOME via NFS. So ~/.local is roamed.
>
> I think there is a slight subtlety h
thon setup.py install --user thing. ;)
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
g considerable amounts to a network-based profile.
3) is sensible but I'd prefer 4):
4) Default to the %APPDATA% env var but give the user a chance to
overwrite the policy with the env var PYTHONUSERBASE, or whatever is a
good name for it. Did I mention that I'm not good in naming things?
Paul Moore wrote:
> The one downside of following expanduser is that Christian's code is
> in C, where ntpath.expanduser is in Python, so there are 2 versions to
> keep in sync. Maybe Christian could expose his C implementation, which
> ntpath.expanduser could then reuse?
a\alpha or
c:\users\groupa\name. The proper way for a ~user implementation is a
bunch of Win32 API calls.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.or
I thought it was a typo but I see the
> same typo in the PEP. I have often wished for something like this for
> debugging, and it might have other uses, but there should be a caution
> against abuse :).
Yeah! I've a tendency to drag typos through my code because I heavil
wing the code posted the other day
> on c.l.py [1] (although I'm now not sure about the l10n
> aspects which Christian mentioned). Any technique of
> going up one (from your own profile) and then down one
> is no better than assuming that all users are in /home
>
On
my box it's only used for some desktop related apps like
~/.local/share/Trash or XFC4.
http://www.freedesktop.org/wiki/Specifications/basedir-spec
Contrary to ~/local, the dot local directory doesn't show up, unless the
user unhides dot files.
Christian
ing for `` (back ticks)
were added. The feature is deprecated but the migration is very simple.
A 2to26 fixer may be worth implementing, too. It could migrate minor
changes like `` -> repr and "except egg, spam" -> "except egg as spam".
Christian
xes this -- it seems a simple matter of
> _ctypes being built before _weakref.
I applied a quick fix in r60043.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
s (and companies) to adjust the user directory for all Python versions.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-de
ause. That is a true semantic change that 2to3 cannot easily fix or
> flag. Consider this an example of how 2to3 and -3 should augment each
> other.
Several warnings have to be removed: ``, callable and maybe more.
Christian
___
Python-Dev mailing
Christian Heimes wrote:
> Ah, you like to keep it simple. The aliases are easily to implement.
> Give me twenty minutes to implement it and write some unit tests.
http://bugs.python.org/issue1865
___
Python-Dev mailing list
Python-Dev@python.or
out with.
We are having a bug day today. Please join us in #python-dev on
irc.freenode.net
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/o
uot; or "license" for more information.
>>> b'a'
'a'
>>> br'\a'
'\\a'
>>> bytes
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Quentin Gallet-Gilles wrote:
> Excellent ! When will be the next one ? :-)
Everyday can be a bug day. :)
Nobody is going to stop you from squalling through the bug tracker.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
h
Malte Helmert wrote:
> One question there: Will the "easy" keyword in roundup be maintained
> further, i.e. will new easy bugs be marked in the future? That would be
> very useful for neophyte contributors.
Yes, we will keep marking easy bugs with the "e
Jan Claeys wrote:
> What do you mean by "configuration directory"? IMHO configuration files
> on linux/unix should go into ~/.python2.6 or ~/.config/python2.6 or
> something like that?
It's already renamed in the PEP:
http://www.python.org/dev/peps/pep-0370/#
Jan Claeys wrote:
> There should be a way for distro developers to make sure the users local
> 'site-packages' is *not* used when running those tools.
There is an option. Those tools should use the -E and -s argument:
#!/usr/bin/env python
n't have as much experience with Unix as we?
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Jan Claeys wrote:
> So this is stuff that should never be changed by the user?
~/.local/lib/python2.6 has the same semantics as
/usr/local/lib/python2.6 except it's a per user directory and not per
machine.
Christian
___
Python-Dev mailing lis
147483647, interactive=-2147483647, optimize=0,
dont_write_bytecode=0, no_user_site=1, no_site=0, ingnore_environment=1,
tabcheck=0, verbose=0, unicode=0)
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Georg Brandl wrote:
> Christian currently does a good job of assigning the correct properties
> to new bugs. In any case, I'd prefer to keep a way to mark a bug as
> "high-priority" (meaning that it should be fixed before the next release)
> even if most of the bugs don&
;
> And also, /usr/bin won't work, FreeBSD uses /usr/local/bin since Python is
> installed through ports and is not a system binary.
The -s option is part of my PEP and is not available in the trunk yet.
The arg -Es may work because Python's arg parser doesn't recognize
#!"):
return
for i in (1, 2):
data = data[data.find('\n'):]
if data.startswith("# -*- py-paranoid -*-"):
return True
return False
Christian
[1] Cygwin discussion thread about #! env
http://www.cygwin.com/ml/cygwin/2002-02/msg00657.html/
_
ncreasing take-up.
setuptools and easy_install won't be included in Python 2.6 and 3.0:
http://www.python.org/dev/peps/pep-0365/
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
?". People see that I invest a fair share of time into the
PEP. So they hope I'm going to solve loosely connected issues, too.
Personally I'm not going to solve every security issue with my PEP. I
suggest that all the people, who were in
error or a typo in the code ^ ?
It's a typo in the code. It's already fixed in the trunk but it was not
fixed in the 370 branch.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubs
tead of creating standalone dlls. I also suspect that it's much
faster because relocation is slow (see PC/dllbase_nt.txt). Martin or
Mark can give you a better answer.
Why do you want to overwrite the existing module instead of using a
different name like ralfmmap?
import ralfmmap as mmap
#x27;s sufficient to add the alias at the
entry point of your application (the script that starts your app). Once
the alias sys.modules]'mmap'] = ralfmmap is set, every import mmap gets
your ralfmmap.
Christian
___
Python-Dev mailing list
Pyt
ead local or global flag for
NaN support. Depending on a flag Python turns a NaN into an exception.
The feature needs a proper PEP. Maybe Mark has time to write a PEP in time.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.
onally the math module is a tiny wrapper around the system's
libm. Functions for magic hooks like __trunc__ usually end up in
builtins. In this particular case I don't mind where the function is
going to live.
Christian
___
Python-Dev mailing
the dll. At last the new modules must be
integrated into the MSI installer script.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-
ceil(n), round(n), trunc(n), int(n)))
...
Python 3:0
2.4 ( 2, 3, 2, 2, 2)
2.6 ( 2, 3, 3, 2, 2)
-2.4 (-3, -2, -2, -2, -2)
-2.6 (-3, -2, -3, -2, -2)
Python 2.6:
2.4 ( 2.0, 3.0, 2.0, 2, 2)
2.6 ( 2.0, 3.0, 3.0, 2, 2)
-2.4 (-3.0, -2.0, -2.0, -2, -2)
-2.6 (-3.0, -2.0, -3.0, -2, -2)
tearray and the new buffer interface from 3.0
* write a replacement for 2.6
* replace the bytearray code with new code
bytearray is a new type that has no equivalent in Python 2.6. Python
3.0's byte type is basically a modified string type. I don't see a
problem with
Jeffrey Yasskin wrote:
> This interpretation implies that complex should provide __float__() to
> return the non-imaginary portion of a complex number. Is that what you
> intend?
No, please don't. If somebody wants to implement __float__ for complex
numbers please define it as hypot(complex) / sqr
g wrong are common. ;) It's astonishing how many major
rounding and division bugs are found by newbies.
Christian
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.pytho
701 - 800 of 1220 matches
Mail list logo