= (c_char_p(c_char *
65) * NumberOfVariables)()"
Can anyboby help? How do I have to state the structure "array of pointers to
char string"? How is a pointer to the first element of such an array defined
using ctypes? How do I allocate enough space for the char the array points
to?
Best rega
amesArray = c.cast(varNames,c.POINTER(PCHAR * numVars.value))
> varTypesArray = c.cast(varTypes,c.POINTER(INT * numVars.value))
What does this cast? How do I know how I have to cast the objects returned
from the library function?
What kind of objects do I get? I learned that the values of objects created
by the ctypes module are accessed using object.value?
Best regards
Georg
--
http://mail.python.org/mailman/listinfo/python-list
tion: You created an object varNamesArray as an ctypes array.
This object has a method "contents". How do I find out what other methods
this objects has? For instance a method to retrieve the size of the array?
Is this documented somewhere?
Best regards
Georg
--
http://mail.python.org/mailman/listinfo/python-list
ere in parameters. What would I have to do different?
Best regards
Georg
--
http://mail.python.org/mailman/listinfo/python-list
el")
print "vn: ", vn.value
print "vl: ", vl.value
returnCode = libc.SetVarLabel(h,byref(vn), byref(vl))
print "Return Code: ", returnCode
The return code is always "variable not found". Thus my call to the C
library is not working.
What do I do wrong?
Best regards
Georg
--
http://mail.python.org/mailman/listinfo/python-list
report bugs to
http://bugs.python.org/
(Thank you to those who reported these regressions.)
Enjoy!
- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire python-dev team and all contributors)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU/Linux
ng any bugs
you may notice to:
http://bugs.python.org/
Enjoy!
(*) Please note that this document is usually finalized late in the release
cycle and therefore may have stubs and missing entries at this point.
--
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire python-dev team and 3.3's contributors)
--
http://mail.python.org/mailman/listinfo/python-list
.0 visit:
http://www.python.org/download/releases/3.3.0/
Please consider trying Python 3.3.0 with your code and reporting any bugs
you may notice to:
http://bugs.python.org/
Enjoy!
(*) Please note that this document is usually finalized late in the release
cycle and therefore may h
otal, almost 500 API items are new or improved in Python 3.3.
For a more extensive list of changes in 3.3.0, see
http://docs.python.org/3.3/whatsnew/3.3.html
To download Python 3.3.0 visit:
http://www.python.org/download/releases/3.3.0/
Please consider trying Python 3.3.0 with you
eases/3.3.0/
Please consider trying Python 3.3.0 with your code and reporting any bugs
you may notice to:
http://bugs.python.org/
Enjoy!
- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire python-dev team and 3.3's contributors)
-BEGIN PGP SIGNATURE-
Ve
eases/3.3.0/
Please consider trying Python 3.3.0 with your code and reporting any bugs
you may notice to:
http://bugs.python.org/
Enjoy!
- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire python-dev team and 3.3's contributors)
-BEGIN PGP SIGNATURE-
Ve
of changes in 3.3.0, see
http://docs.python.org/3.3/whatsnew/3.3.html
To download Python 3.3.0 visit:
http://www.python.org/download/releases/3.3.0/
This is a production release, please report any bugs to
http://bugs.python.org/
Enjoy!
--
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire python-dev team and 3.3's contributors)
--
http://mail.python.org/mailman/listinfo/python-list
On 09/29/2012 06:53 PM, Antoine Pitrou wrote:
Hello,
I've created a 3.3 category on the buildbots:
http://buildbot.python.org/3.3/
http://buildbot.python.org/3.3.stable/
Someone will have to update the following HTML page:
http://python.org/dev/buildbot/
Should be done now.
Georg
--
s such as "sendfile()"
For a more extensive list of changes in 3.3.0, see
http://docs.python.org/3.3/whatsnew/3.3.html
To download Python 3.3.0 visit:
http://www.python.org/download/releases/3.3.0/
Please consider trying Python 3.3.0a1 with your code and reporting any
bugs you
ython.org/
Enjoy!
(*) Please note that this document is usually finalized late in the release
cycle and therefore may have stubs and missing entries at this point.
- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire python-dev team and 3.3's cont
any bugs
you may notice to:
http://bugs.python.org/
Enjoy!
(*) Please note that this document is usually finalized late in the release
cycle and therefore may have stubs and missing entries at this point.
- - --
Georg Brandl, Release Manager
georg at python
3.0 visit:
http://www.python.org/download/releases/3.3.0/
Please consider trying Python 3.3.0 with your code and reporting any bugs
you may notice to:
http://bugs.python.org/
Enjoy!
(*) Please note that this document is usually finalized late in the release
cycle and therefore
load Python 3.3.0 visit:
http://www.python.org/download/releases/3.3.0/
Please consider trying Python 3.3.0 with your code and reporting any bugs
you may notice to:
http://bugs.python.org/
Enjoy!
(*) Please note that this document is usually finalized late in the release
cycle and
http://docs.python.org/3.2/whatsnew/3.2.html
To download Python 3.2.1 visit:
http://www.python.org/download/releases/3.2.1/
This is a testing release: Please consider trying Python 3.2.1 with your code
and reporting any bugs you may notice to:
http://bugs.python.org/
Enjoy!
--
Georg
features in the 3.2 line, see
http://docs.python.org/3.2/whatsnew/3.2.html
To download Python 3.2.1 visit:
http://www.python.org/download/releases/3.2.1/
This is a final release: Please report any bugs you may notice to:
http://bugs.python.org/
Enjoy!
- --
Georg Brandl, Release
list of changes in 3.2, see
http://docs.python.org/3.2/whatsnew/3.2.html
To download Python 3.2 visit:
http://www.python.org/download/releases/3.2/
Please consider trying Python 3.2 with your code and reporting any bugs
you may notice to:
http://bugs.python.org/
Enjoy!
- --
Georg
http://docs.python.org/3.2/whatsnew/3.2.html
To download Python 3.2.1 visit:
http://www.python.org/download/releases/3.2.1/
This is a testing release: Please consider trying Python 3.2.1 with your code
and reporting any bugs you may notice to:
http://bugs.python.org/
Enjoy!
--
Georg
work seems to work just fine.
I am not sure though if there are any system processes, say during
boot-up, that depend on "python" pointing to the original location, or
if there could be problems with more complex code than "Hello world".
Any insights welcome
Georg
--
http://mail.python.org/mailman/listinfo/python-list
erman with strong interests in
programming and, of course, especially in Python (I love it...).
Does anyone run, or participate in, a project looking for fellow
programmers? I don't have a special area of interest, well, perhaps web
programming...
Thanks,
Georg
--
http://mail.python.org/m
new_robot
def __getattr__(self, name):
if name in self:
return self[name]
raise AttributeError
robots = Robots()
robots.new('Bert')
robots.new('Ernie')
robots.Bert.sayhi()
robots["Bert"].sayhi()
for robot in robots:
robot.sayhi()
... etc ...
This doesn't include ugly globals() and exec "tricks".
Georg
--
http://mail.python.org/mailman/listinfo/python-list
devil-may-care attitude about punctuation
> makes it difficult to tell for sure :-)
And it should have been and perhaps will be a function in Python, see
"Python Regrets" by GvR.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
g.
You don't need the parentheses for one element either:
for person, in c:
print person
works perfectly. Note the trailing comma.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
Dan Stromberg wrote:
> Is there a python module that can mount a filesystem?
>
> More specifically, a loopback filesystem with a particular offset, under
> linux?
Why don't you just call the mount command via os.system, one of the
popen methods or one of the commands.* methods
ange(). It is completely equal to
> range() except that it returns a generator instead of a list.
Slight terminology glitch -- it does return an iterator, not a
generator. Generators are functions that return iterators.
regards,
Georg
--
http://mail.python.org/mailman/listinfo/python-list
Alex Martelli wrote:
> Georg Brandl <[EMAIL PROTECTED]> wrote:
>
>> Slight terminology glitch -- it does return an iterator, not a
>> generator. Generators are functions that return iterators.
>
> xrange returns an ITERABLE, not an ITERATOR. Videat:
>
&g
* Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote:
> Steven D'Aprano wrote:
> 1+0j == 1 > 0
>> True
>
> (1+0j == 1) yields True, which is comparable to 0.
"a == b > c" is equivalent to "a == b and b > c":
>>> 1 == 1+0j > 0
Traceback (most recent call last):
File "", line 1, in ?
TypeError: ca
with less features of course.
Would this be acceptable?
feel-free-to-comment-ly yours,
Georg
--
http://mail.python.org/mailman/listinfo/python-list
mething which is
> notoriously platform dependent. 2.4's subprocess module should probably
> be used here, but I don't think Portage does, yet. OTOH, it's Gentoo, so
> it wouldn't surprise me, either. :-)
That's right, but I would just draw the line at Pytho
Robert Kern wrote:
> Georg Brandl wrote:
>> Robert Kern wrote:
>>
>>>Mike Meyer wrote:
>>>
>>>>Nick Coghlan <[EMAIL PROTECTED]> writes:
>>>>
>>>>
>>>>
>>>>>I don't know enough about Porta
I believe os.path.abspath and os.path.realpath are the same.
> realpath is just an alias for abspath.
Yes, on Windows. On UNIX systems, realpath resolves symbolic links while
abspath doesn't.
mfg
Georg
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
in follow-up to the recent "dictionary accumulator" thread, I wrote a
little module with several subclassed dicts.
Comments (e.g. makes it sense to use super), corrections, etc.? Is this
PEP material?
Docstrings, Documentation and test cases are to be provided later.
raise err
Although I'm not sure whether KeyError would be the right one to raise
(perhaps a custom error?).
> I don't ever have an itch for sorted dictionaries, as far as I can
> remember, and I don't immediately understand the use of
> keytransformdict. C
faultvalue(0) instead of the tally approach and
defaultdict.setdefaultfactory(list) instead of listappend.
> 4. On super, no I don't think it's necessary or particularly desirable.
> These
> specializations have a close association with dict. dict.method(self,...)
> feels
> more appropriate in this case.
Any other opinions on this?
Thanks for the comments,
mfg
Georg
--
http://mail.python.org/mailman/listinfo/python-list
Michael Spencer wrote:
> Georg Brandl wrote:
>
>>
>> I think I like Jeff's approach more (defaultvalues are just special
>> cases of default factories); there aren't many "hoops" required.
>> Apart from that, the names just get longer ;)
>
&
ltkeytransformdict(defaultdict, keytransformdict):
pass
At least I hope so. This is another argument against the initializing
of defaultfactory or keytransformer in __init__.
mfg
Georg
Here comes the current module (keytransformdict should be working now
for all dict methods):
# specialdict - subcl
Georg Brandl wrote:
> Michele Simionato wrote:
>> About not using super: you might have problems in multiple inheritance.
>> Suppose I want to use both your defaultdict and a thirdpartdict. A
>> subclass
>>
>> class mydict(defaultdict, thirdpartdict):
&g
>
>
>
> """
REs are Regular Expressions, not parsers. There are problems for
which there is no RE solution (I'm not implying that this is the
case in your example).
In any case, complex text processing should be done using tools
better suited to this. In this case, HTMLParser seems like a
reasonable choice.
mfg
Georg
--
http://mail.python.org/mailman/listinfo/python-list
gt;>>>
Of course it does. This is not a problem with Unix-style filesystems
because there a directory either exists or not. However, under Windows,
the drive letters for floppies or CDs exists even if there is no media
inserted. It is, of course, questionable whether isdir() and exists()
should return True in this case.
mfg
Georg
--
http://mail.python.org/mailman/listinfo/python-list
te me, for example constantly asking if I want to
> enable a "recursive mini-buffer", which I have no clue about or
> interest in. Epsilon is a well-done Emacs IMO.
constantly? You seem to make fundamental mistakes using Emacs. Reading one or
two tutorials could have helped.
mfg
Georg
--
http://mail.python.org/mailman/listinfo/python-list
Georg Brandl wrote:
> Hello,
>
> in follow-up to the recent "dictionary accumulator" thread, I wrote a
> little module with several subclassed dicts.
>
> Comments (e.g. makes it sense to use super), corrections, etc.? Is this
> PEP material?
>
> Docstrings
gs to
http://bugs.python.org/
Enjoy!
- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire python-dev team and 3.3's contributors)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)
iEYEARECAAYFAlKB1G4ACgkQN9GcIYhpnLAu5gCfRkfpnEs+rmtZ9i
long as python-list is
coupled to Usenet, there will be little to no barrier to posting, and the
only way to get rid of trolls is to ignore them.
Let the barrage of posts continue for a few more days; if he doesn't get
replies he will get fed up eventually.
cheers,
Georg
--
https://mail.python.org/mailman/listinfo/python-list
visit:
http://www.python.org/download/releases/3.3.3/
This is a production release, please report any bugs to
http://bugs.python.org/
Enjoy!
- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire python-dev team and 3.3's contributors)
[1] http://bugs.
http://www.python.org/download/releases/3.3.4/
This is a preview release, please report any bugs to
http://bugs.python.org/
The final version is scheduled to be released in two weeks' time, on or about
the 10th of February.
Enjoy!
- --
Georg Brandl, Release Manager
georg at pyth
http://bugs.python.org/
Enjoy!
- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire python-dev team and 3.3's contributors)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)
iEYEARECAAYFAlL5PMwACgkQN9GcIYhpnLCv4wCePNVqwsOYCHdJBi
t;)
>>> q = p / "init.d"
Traceback (most recent call last):
File "", line 1, in
TypeError: unsupported operand type(s) for /: 'PosixPath' and 'str'
>>>
On the same computer, using rescuecd 4.4.1 (Nov 2014) which ships python
3.4.1 it works as expected.
thanks for help, Georg
--
https://mail.python.org/mailman/listinfo/python-list
nload Python 3.3.5 visit:
http://www.python.org/download/releases/3.3.5/
This is a preview release, please report any bugs to
http://bugs.python.org/
The final release is scheduled one week from now.
Enjoy!
- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire p
nload Python 3.3.5 visit:
http://www.python.org/download/releases/3.3.5/
This is a preview release, please report any bugs to
http://bugs.python.org/
The final release is scheduled one week from now.
Enjoy!
- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire p
3.3.5 visit:
http://www.python.org/downloads/release/python-335/
This is a production release, please report any bugs to
http://bugs.python.org/
The final release is scheduled one week from now.
Enjoy!
- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire p
to be released in two weeks' time, on or about
the 10th of November.
Enjoy!
- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire python-dev team and 3.3's contributors)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.
se open an issue on the Python bug tracker for the Python component of
> this.
>
> http://bugs.python.org
And please mark as release blocker, I think this should go into 3.3.3rc2.
Georg
--
https://mail.python.org/mailman/listinfo/python-list
https://www.python.org/downloads/release/python-336rc1/
These are pre-releases, please report any bugs to
http://bugs.python.org/
The final releases are scheduled one week from now.
Enjoy!
- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire python-dev team and contrib
These are production versions, please report any bugs to
http://bugs.python.org/
Enjoy!
- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire python-dev team and contributors)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2
iEYEARECAAYF
notice to:
http://bugs.python.org/
To download Python 3.2.4 or Python 3.3.1, visit:
http://www.python.org/download/releases/3.2.4/ or
http://www.python.org/download/releases/3.3.1/
respectively.
Enjoy!
- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire
://www.python.org/download/releases/3.3.1/
respectively. As always, please report bugs to
http://bugs.python.org/
Enjoy!
- --
Georg Brandl, Release Manager
georg at python.org
(on behalf of the entire python-dev team and all contributors)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU
Am 06.04.2013 22:48, schrieb cmcp:
> On Saturday, 6 April 2013 21:43:11 UTC+1, Georg Brandl wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>>
>> Hash: SHA1
>>
>>
>>
>> On behalf of the Python development team, I am pleased to announce the
&g
JavaScript replacement. (look in the python-dev archives
for more)
Georg
--
http://mail.python.org/mailman/listinfo/python-list
cies on the system stating what types of exceptions can
> be raised?
>
> Is there a way in python to say, "hey, catch everything but these two"?
Yes:
try:
...some code...
except (AttributeError, TypeError):
raise
except Exception, e:
handle all other exceptions
is
gt;> > return self
>
> Oh, I see. I tried that and it worked well, but the broken int(obj) is
> too annoying.
The problem is that int() checks if the argument is a string (which includes
subclasses) and directly tries to convert the string without looking at
__int__. If you want, you can report this as a bug and see if other
developers agree.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
... raise ex
> ...
>
> Won't catch it!
> Traceback (most recent call last):
> File "", line 7, in ?
> AttributeError
>
> Or that sort of thing.
To just reraise an exception, use a bare "raise".
Georg
--
http://mail.python.org/mailman/listinfo/python-list
s you don't want
> to handle inherit from a small number of base classes; yours has the
> advantage if there are a large number of unrelated exceptions that need
> ignoring.
His code is wrong since "err" is not the exception class but an instance.
"if type(err) ..." would be correct but unpythonic.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
mmand-line switches should do something informative when run with a -h
>> switch.
>>
> Doh! Me thinks Windows at work "python /?" (No good!), Linux at home
> "python -h" (Ah ha!). I still think it should be in the docs somewhere.
python /? now works in 2.5 SVN.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
s when an object of a builtin type
is considered false (i.e. when it's empty). So why not take advantage of
this?
Georg
--
http://mail.python.org/mailman/listinfo/python-list
value of an object
> don't give the expected result, happen often enough to make me
> carefully think about what I want to test for and then explicitly
> do so.
You're right, carefully thinking is always a good thing. Not using a
language feature just because it would fail in another case is not.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
de.co_flags
99
=> 32 (CO_GENERATOR in compiler.consts) is the flag that indicates a
generator code object.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
ons that you are comparing are not
> even equivalent, and moreover you ignored an expression that will be
> faster and equivalent (unless/until somebody decides on an
> "optimisation" like interning/sharing strings between/among sys.argv
> elements).
Let me point out that len(argv) == 1 is the only one that will work if
argv is []. ;) (took me a few seconds to realize I must put a smiley there)
Georg
--
http://mail.python.org/mailman/listinfo/python-list
uot;PSF Python" are you referring to? I can't find a distribution
that's 300 MB in size...
Georg
--
http://mail.python.org/mailman/listinfo/python-list
I don't think it would be so large) you should not call that "PSF
Python". The Python Windows installer available from python.org is around 10,
the source distribution around 8 MB.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
However, the PyPI page provides no download or homepage links.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
at the bottom rather fast. If it's gone by the
> time you check, type SE into the search template in the upper right corner.
Thanks, but I know how to use the Cheese Shop.
Last time I looked, there was no file available for download. Now it is.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
; class MyClass:
> ...
>
>
> Am I missing something here? What is the preferred pythonic way of
> implementing singleton elegantly?
You can always use the syntax the decorator replaces:
class MyClass:
...
MyClass = singleton(MyClass)
But there are better ways, an
er to
> write a Python code formatter that adds them than it is to write a C code
> formatter that adds proper indentation and provides your preferred
> placement of braces.
It's already there: Tools/scripts/pindent.py.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
suggestions like this?
Post a RFE to the Python Tracker at
http://sourceforge.net/tracker/?group_id=5470&atid=355470
If you want, assign it to me (gbrandl).
Georg
--
http://mail.python.org/mailman/listinfo/python-list
sum up strings? Besides, the ''.join idiom is quite
common in Python.
In this special case, ''.join is much faster than sum() which is why
sum() denies to concat strings.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
> __init__() just do del(self), or is there
> a better way to think about this?
There is a way, of course, that results in myfoo
being None in case of an error, but it is not a one-liner and
I'd not recommend it.
If something goes wrong, raising an exception is the best thing to do.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
nd
> works for some types but not for strings which seems an arbitrary
> limitation that impede duck typing.
Only that it isn't arbitrary.
> - Pad.
>
> P.S. I can see why, and am used to the ''.join method. A newbie
> introduced to sum for integers might n
ure I could do something more
> functional or one lined like:
>
> Banana={}
> names = filter(lambda x:id(eval(x))==id(Banana),dir())
>
> but I am guessing that it is harder to read by many. Anywho I can
> think of plenty of reasons it would fail, but it really depends on the
>
Paul Rubin wrote:
> Georg Brandl <[EMAIL PROTECTED]> writes:
>> Why would you try to sum up strings? Besides, the ''.join idiom is quite
>> common in Python.
>
> Just because it's common doesn't mean it's obvious. In my opinion
> it
Bill Pursell wrote:
> Georg Brandl wrote:
>> Paul Rubin wrote:
>> > Sybren Stuvel <[EMAIL PROTECTED]> writes:
>> >> Because of "there should only be one way to do it, and that way should
>> >> be obvious". There are already the str.
t work.
You can't import modules whose names have non-identifier names with
plain "import". Or would you like "123" to refer to a module?
If you have to do this (and I have a strong feeling that you haven't)
use the built-in function __import__().
Georg
--
http://mail.python.org/mailman/listinfo/python-list
01 wrote:
> Georg Brandl wrote:
>> [EMAIL PROTECTED] wrote:
>> > bugnthecode 写道:
>> >
>> >> How are you trying to import it? Is it in the same directory as your
>> >> other script? If not is your python path set correctly?
>> >>
>
print x
>
> "Value intended for the variable x"
>
Georg
--
http://mail.python.org/mailman/listinfo/python-list
just one of an infinite number of possible "traps for the unwary".
>
> I would have thought it would be better for sum() to raise a warning, not
> an exception. If we take seriously the argument that sum implies
> addition, and that string concatenation isn't really addition, then sum()
> should also refuse to operate on lists and tuples and any other
> non-numeric class. Either would be better than sum() "protecting" the user
> from himself, except when it doesn't.
Well, present that on python-dev.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
l
>
>
>
> data = [
> "sldjflsdfj\tlsjdlj\tlkjsdlkfj",
> "lsdjflsjd\tlsjdlfdj\tlskjdflkj",
> "lskdjfl\tlskdjflj\tlskdlfkjsd",
> ]
>
> def splitUsing(chars):
> def tmp(s):
> return s.split(chars)
> return tmp
>
> for d in map(splitUsing('\t'), data):
> print d
And why is this better than
map(lambda t: t.split('\t'), data)
?
Georg
--
http://mail.python.org/mailman/listinfo/python-list
t;> else
>> return false
>>
>> exec = ExecutionEnv()
>>
>> How to I get access to the CALLING_MODULE ?
>>
>> -
>>
>> Are ther alternative constructs/mechanism available, which could be
>> used to add this functionality possiby direc
class NamedDict(dict):
def __init__(self, _name_, *args, **kwargs):
self.name = _name_
dict.__init__(self, *args, **kwargs)
Georg
--
http://mail.python.org/mailman/listinfo/python-list
on't? Python doesn't attempt to track what name
> they are known at *now*, just the name they were born with.
Because they're not created by simple assignment, because they are
usually created once, because new names are bound to them rarely,
and because it's crucial to know their name in debugging, introspection etc.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
letely meaningless.
When a name goes out of scope, but the object continues to live (e.g.
because it's returned by some function), the name is void.
Etc.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
Jack Diederich wrote:
> QOTW: "Because there's no chance that the original request is sane." - Georg
> Brandl (responding to a question involving a Banana)
Looks like I'm trying to fulfil my bot duties from time to time ;)
> "this is one of your last chances
most Python documentation: you're not told
if the described function is implemented in C, and if it is
keyword arg-enabled. The arguments must be given names though,
to be able to document them.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
No, it's saying: "if the Python community is able to provide the
required amount of time to do the admin work, we'll use the
tool written in Python."
> Anyway. The whole selection process is intransparent.
Steve has already pointed you to the wiki page.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Georg Brandl wrote:
>
>>> The python foundation suggests a non-python non-open-source bugtracking
>>> tool for python.
>>
>> Actually, it suggests two bugtracking tools, one of them written in
>> Python.
>
> the announcema
gt; instance() argument 1 must be classobj, not type" ...
>
> So my question is, how to replicate new.instance() functionality with new
> classes?
Use object.__new__.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
tem__(self, name):
try:
return dict.__getitem__(self, name)
except KeyError:
exc = sys.exc_info()
try:
return __import__(name)
except ImportError:
raise exc[0], exc[1], exc[2]
d = LazyImpDict()
code.i
There is a possibility to do that with globals, provided you do
exec code in globals_dict
where globals_dict is an instance of a subclass of dict that has a
customized __setitem__.
Georg
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 459 matches
Mail list logo