pander
library provides.
Homepage: https://github.com/zuo/unittest_expander
PyPI: https://pypi.org/project/unittest-expander/
Documentation: https://unittest-expander.readthedocs.io/en/stable/
Cheers,
Jan Kaliszewski (zuo) z...@kaliszewski.net
___
ovides.
Homepage: https://github.com/zuo/unittest_expander
PyPI: https://pypi.org/project/unittest-expander/
Documentation: https://unittest-expander.readthedocs.io/en/stable/
Cheers,
Jan Kaliszewski (zuo)
___
Python-announce-list mailing list -- python-an
pander/
Documentation: https://unittest-expander.readthedocs.io/en/stable/
Cheers,
Jan Kaliszewski (zuo)
https://unittest-expander.readthedocs.io/en/stable/;>unittest_expander
0.4.0
- a library that provides flexible and easy-to-use tools to parametrize Python
unit tests.
(
Jan Kaliszewski added the comment:
Sure. But don't you think there should be ``.__get__(a, type(a))`` rather than
``.__get__(a, A)``? Then the whole statement would be true regardless of
whether A is the actual type of a, or only a superclass of the type of a.
That would also be more
Jan Kaliszewski added the comment:
I am very sorry, I just noticed another mistake.
It should be:
A dotted lookup such as ``super(A, obj).x`` (where ``obj``
is an instance of ``A`` or of a subclass of ``A``) searches
``type(obj).__mro__`` for such a base class ``B`` that follows
Jan Kaliszewski added the comment:
Sorry, a few mistakes distorted my proposal. It should be:
A dotted lookup such as ``super(A, obj).x`` (where ``obj`` is an
instance of ``A`` or of a subclass of ``A``) searches ``A.__mro__``
for a base class whose `__dict__` contains name ``&q
Jan Kaliszewski added the comment:
So the current (after the aforementioned commit) form of the description is:
A dotted lookup such as ``super(A, a).x`` searches
``obj.__class__.__mro__`` for a base class ``B`` following ``A`` and then
returns ``B.__dict__['x'].__get__
New submission from Jan Kaliszewski:
To some extent, this issue is a follow-up of Issue 20132. It concerns some
parts of functionality + documentation of the 'codecs' module related to
registering custom codecs, especially non-string ones (i.e., codecs that
encode/decode between arbitrary
Jan Kaliszewski added the comment:
Sorry,
s/Issue 20132/Issue 19548/g
Issue 20132 is also related somehow, but here I ment that this is a follow-up
of Issue 19548; and Zoinkity's concerns I cited are also from Issue 19548, and
not from 20132
Changes by Jan Kaliszewski z...@chopin.edu.pl:
--
resolution: - duplicate
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19539
Jan Kaliszewski added the comment:
My concerns are now being addressed in the issue19548.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19539
PyPI: https://pypi.python.org/pypi/unittest_expander
Documentation: http://unittest-expander.readthedocs.org/en/latest/
Cheers,
Jan Kaliszewski (zuo)
--
https://mail.python.org/mailman/listinfo/python-announce-list
Support the Python Software Foundation:
http://www.python.org/psf
New submission from Jan Kaliszewski:
1. One misleading detail in the descriptor protocol documentation for super
bindings is that the following fragment of the
http://docs.python.org/reference/datamodel.html#invoking-descriptors page:
Super Binding
If a is an instance of super
Changes by Jan Kaliszewski z...@chopin.edu.pl:
--
title: Misleading examples indDescriptor protocol documentation - Misleading
examples in the descriptor protocol documentation
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Jan Kaliszewski added the comment:
Which means that the description Produce a string that is suitable as raw
Unicode literal in Python source code is (in Python 3.x) no longer true.
So, if change/removal is not possible because of internal significance of the
codec, I believe
New submission from Jan Kaliszewski:
When learning about the 'codecs' module I encountered several places in the
docs of the module that, I believe, could be improved to be clearer and easier
for codecs-begginers:
1. Ad `codecs.encode` and `codecs.decode` descriptions: I believe it would
Jan Kaliszewski added the comment:
s/world/word
s/begginers/beginners
(sorry, it's late night here)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19548
Jan Kaliszewski added the comment:
8. Again ad `codecs.open`: the default file mode is actually 'rb', not 'r'.
9. Several places in the docs -- ad: `codecs.register_error`, `codecs.open`,
`codecs.EncodedFile`, `Codec.encode/decode`, `codecs.StreamWriter/StreamReader`
-- do not cover cases
Jan Kaliszewski added the comment:
11. Ad encoding 'undefined': The sentence `Can be used as the system encoding
if no automatic coercion between byte and Unicode strings is desired.` was
suitable for Python 2.x, but not for Python 3.x'. I believe, this sentence
should be removed
Changes by Jan Kaliszewski z...@chopin.edu.pl:
--
versions: -Python 2.6, Python 2.7, Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19548
New submission from Jan Kaliszewski:
It seems that the 'raw_unicode_escape' codec:
1) produces data that could be suitable for Python 2.x raw unicode string
literals and not for Python 3.x raw unicode string literals (in Python 3.x
\u... escapes are also treated literally);
2) seems
New submission from Jan Kaliszewski:
In Python 3.3 threading.get_ident() has been added as a public and documented
function, but there is no dummy_threading.get_ident():
import threading, dummy_threading
threading.get_ident()
139974728402752
dummy_threading.get_ident
Jan Kaliszewski added the comment:
As I wrote on the list -- IMHO it's still a bug (even though not so painful as
segfault) that should also be fixed in 2.7 and 3.2/3.3. In other cases (such
as `d={}; d[42]=d; repr(d)`) Python does its best to avoid an error -- why in
this case (`d={}; d[42
Jan Kaliszewski z...@chopin.edu.pl added the comment:
PS. For the record: the final recipe is here:
http://code.activestate.com/recipes/577629-namedtupleabc-abstract-base-class-mix-in-for-named/
--
___
Python tracker rep...@bugs.python.org
http
Jan Kaliszewski z...@chopin.edu.pl added the comment:
Thank you. Raymond is against the idea so I don't know if it makes sense to
create the real patch for now (it would patch the collections module and, I
suppose, addming tests, docs etc.). Anyway, if somebody would be interested in
the idea
Jan Kaliszewski z...@chopin.edu.pl added the comment:
On python-ideas I have proposed an ABC being also a kind of a mix-in,
potentially making namedtuple subclassing (with custom methods etc.) more
convenient, e.g.:
class MyRecord(namedtuple.abc):
_fields = 'x y z'
def
Jan Kaliszewski z...@chopin.edu.pl added the comment:
PS. Newer, shorter version: http://dpaste.org/2aiQ/
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7796
Changes by Jan Kaliszewski z...@chopin.edu.pl:
--
nosy: +zuo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9232
___
___
Python-bugs-list mailing
Jan Kaliszewski z...@chopin.edu.pl added the comment:
From 10682: The patch proposed in this (#9232) issue does not fix call syntax
but def sytax only. I think it should fix call sytax as well (see code
examples in #10682).
--
___
Python tracker
Jan Kaliszewski z...@chopin.edu.pl added the comment:
python-dev discussion continuation:
http://mail.python.org/pipermail/python-dev/2010-December/106770.html
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9232
New submission from Jan Kaliszewski z...@chopin.edu.pl:
Let examples speak:
def x(a, z): pass # this is ok
def x(a, z,): pass # this is ok
def x(a, *, z): pass # this is ok in Py3k
def x(a, *, z,): pass # but this causes SyntaxError (!)
def x(a, *args): pass
Jan Kaliszewski z...@chopin.edu.pl added the comment:
s/**{5: 6}/**{'5': 6}/g (but it's a detail)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10682
Jan Kaliszewski z...@chopin.edu.pl added the comment:
Oops, I see the problem was partly addressed @ issue9232.
But:
* the proposed patch doesn't fix calls (but defs only),
* shouldn't be the issue considered as a bug -- and fixed also in 2.7 and 3.1
Terry Reedy dixit (2010-05-12, 14:26):
On 5/12/2010 1:26 PM, Giampaolo Rodolà wrote:
2010/5/12 Gabriel Genellinagagsl-...@yahoo.com.ar:
open() in Python 3 does a lot of things; it's like a mix of codecs.open() +
builtin open() + os.fdopen() from 2.x all merged together. It does different
New submission from Jan Kaliszewski z...@chopin.edu.pl:
del list_instance([start : stop : very_big_step]) causes segfaults...
The boundary values seem to be:
* start -- near length of the list
* stop -- near (-length) of the list
* very_big_step -- near sys.maxint
Let examples speak...
from
Jan Kaliszewski z...@chopin.edu.pl added the comment:
** Erratum **
-- was:
del list_instance([start : stop : very_big_step]) causes segfaults...
-- should be:
del list_instance[start : stop : very_big_step]
causes segfaults...
** Post scriptum **
In each example only the last statement causes
Jan Kaliszewski z...@chopin.edu.pl added the comment:
Interesting that in Py2.5...
del range(10)[::maxint]
...this causes segfault but in Py2.6 is ok, as well as in Py3.0 (with maxsize
insetad of maxint). (That's why I didn't noticed that it concerns newer version
than 2.5, and marked only
Jan Kaliszewski z...@chopin.edu.pl added the comment:
PS. Is such a data-dependant segfault considered as security problem? (if it
is, maybe Python2.5 shuld be kept in Versions list)
--
___
Python tracker rep...@bugs.python.org
http
defined (see:
http://docs.python.org/reference/datamodel.html#slots).
Regards,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
: 2.37005710602
consume3
10: 1.6071870327
100: 1.61109304428
1000: 1.60717701912
None: 1.81885385513
Regards,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
as to the
attributes of the dict_keys class. but i don't know how to look at
that without first *creating* such an instance, then asking for
dir(dk).
Why you bother about creating an instance? Just do it:
list(vars(type({}.keys(
or dir(type({}.keys()))
if dir() satisfies you.
Regards,
*j
--
Jan
24-01-2010, 16:56:42 Jan Kaliszewski z...@chopin.edu.pl wrote:
24-01-2010, 16:28:26 Robert P. J. Day rpj...@crashcourse.ca wrote
once again, probably a trivial question but i googled and didn't
get an obvious solution. how to list the attributes of a *class*?
dir(type(an_obj
: 12.5794699192
None: 28.5096430779
consume3
10: 2.39173388481
100: 3.43043398857
1000: 14.3361399174
None: 14.8560190201
Regards,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
24-01-2010, 17:37:41 Alf P. Steinbach al...@start.no wrote:
DictKeys = type( {}.keys() )
dir( DictKeys )
list( vars( DictKeys ) )
help( DictKeys )
It doesn't help much though because the only method of interrest is
__iter__
Not only. Please, consider:
dictkeys =
=70296pathrev=70296
Nice. :)
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
Changes by Jan Kaliszewski z...@chopin.edu.pl:
--
title: Doc for itertools recipe consume is complicated and less efficient -
dictview
versions: -Python 2.6, Python 2.7, Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Changes by Jan Kaliszewski z...@chopin.edu.pl:
--
title: dictview - Doc for itertools recipe consume is complicated and less
efficient
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7764
Jan Kaliszewski z...@chopin.edu.pl added the comment:
(sorry! typed into a wrong field)
--
nosy: +zuo
versions: +Python 2.6, Python 2.7, Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7764
New submission from Jan Kaliszewski z...@chopin.edu.pl:
Dictionary views documentation (e.g.
http://docs.python.org/3.1/library/stdtypes.html#dictionary-view-objects)
contains nothing about comparison ( = = == !=) operations.
--
assignee: georg.brandl
components: Documentation
23-01-2010 o 15:49:23 Diez B. Roggisch de...@nospam.web.de wrote:
Am 23.01.10 15:44, schrieb Roald de Vries:
Dear all,
I sometimes want to use an infinite while loop with access to the loop
index, like this:
def naturals():
i = 0
while True:
yield i
y += 1
for i in naturals():
print(i)
I
.
Please also note that you can apply not only str-based symbols but any
hashable objects (obviously it could be event implemented in less
efficient way to accept *any* objects, though I doubt it's worth to do...).
Regards,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http
s/sollution/solution
s/event implemented/even implemented
Sorry
*j
--
http://mail.python.org/mailman/listinfo/python-list
).
If the list were immutable, no searching would be needed (indexes would
be sufficient), but in real life users can be added and deleted in the
meantime (so index of a particular name changes).
Regards,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo
, the
following code?
def consume(iterator, n):
for _ in islice(iterator, n): pass
Probably the former is faster. But I haven't check it. If you are curious,
use timeit module...
Regards,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
PS.
22-01-2010 o 15:44:28 Jan Kaliszewski z...@chopin.edu.pl wrote:
22-01-2010, 14:58:58 Gilles Ganault nos...@nospam.com wrote:
On 22 Jan 2010 13:35:26 GMT, Neil Cerutti ne...@norwich.edu wrote:
Resorting is more work than is needed. Just choose a different
starting index each time you
://code.activestate.com/recipes/576998/).
Regards,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
Dnia 21-01-2010 o 08:49:22 Chris Rebert c...@rebertia.com napisał(a):
On Wed, Jan 20, 2010 at 5:50 PM, Steven D'Aprano
ste...@remove.this.cybersource.com.au wrote:
On Thu, 21 Jan 2010 02:02:02 +0100, Jan Kaliszewski wrote:
http://code.activestate.com/recipes/576998/
What's the advantage
Dnia 21-01-2010 o 09:27:52 Raymond Hettinger pyt...@rcn.com napisał(a):
On Jan 20, 5:02 pm, Jan Kaliszewski z...@chopin.edu.pl wrote:
http://code.activestate.com/recipes/576998/
Using an underlying list to track sorted items
means that insertion and deletion take O(n) time.
That could
curious about your
opinions.
Regards,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I have a question: are class decorator planned to be backported from 3.x?
All the best,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
09-01-2010 o 22:34:28 Jack Diederich jackd...@gmail.com wrote:
On Sat, Jan 9, 2010 at 2:53 PM, Jan Kaliszewski z...@chopin.edu.pl
I have a question: are class decorator planned to be backported from
3.x?
Eh? Class decorators have been in the 2.x series since 2.6.
Oops, I overlooked
), (5, None)]
See:
http://docs.python.org/library/functions.html#zip
http://docs.python.org/library/functions.html#map
http://docs.python.org/library/itertools.html#itertools.izip_longest
Cheers,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
PS. Sorry, I wrote:
zip(*[iter(s)]*3) # or simpler: zip(s) :-)
But should be
zip(*[iter(s)]*1) # or simpler: zip(s) :-)
*j
--
http://mail.python.org/mailman/listinfo/python-list
Rajat rajat.dud...@gmail.com wrote:
I've single CPU machine. I've a feeling that the thread created, which
would run script2, would eat up all of the CPU if I do not use sleep()
in script2.
That way, script1 would still be waiting for script2 to finish.
Single CPU is not a problem for
Valentin de Pablo Fouce thi...@gmail.com wrote:
On 6 ene, 22:42, Jan Kaliszewski z...@chopin.edu.pl wrote:
Valentin de Pablo Fouce thi...@gmail.com wrote:
Ok, I am trying to do a very quick application (is home based so is
not a big deal...). My intention is to transfer files from one
:
http://docs.python.org/library/simplehttpserver.html
http://docs.python.org/library/cgihttpserver.html
http://docs.python.org/library/basehttpserver.html
-- as well as:
http://docs.python.org/library/urllib.html
http://docs.python.org/library/urllib2.html
Cheers,
*j
--
Jan Kaliszewski (zuo) z
(booze, juice),
Bottle(booze, juice))
for booze, juice in product(liquors, juices))
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
However the following is not an error
for x in []:
assert type(x) == type(())
Trying to iterate over an empty sequence or iterator causes
0 (zero) steps of iteration -- so above assert statement is
never run.
Cheers,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http
31-12-2009 Rodrick Brown rodrick.br...@gmail.com wrote:
I started dabbling with threads in python and for some odd reason the
performance seems extremely poor on my 2 core system.
It this a simplified version spawn 2 threads write some data to a file
and time the results vs doing the same
01-01-2010 o 02:30:20 W. eWatson wolftra...@invalid.com wrote:
About a year ago, I wrote a program that used mod() for modulo under
2.5. Apparently, % is also acceptable, but the program works quite well.
I turned the program over to someone who is using 2.4, and apparently
2.4 knows
and objects as values), use:
mod = sys.modules[MyClass.__module__] # (as above)
vars(mod) # or mod.__dict__, though vars(mod) seems to me more elegant
Cheers,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
08-09-2009 o 02:15:10 Steven D'Aprano st...@pearwood.info wrote:
On Mon, 7 Sep 2009 09:37:35 am Jan Kaliszewski wrote:
06-09-2009 o 20:20:21 Ethan Furman et...@stoneleaf.us wrote:
... I love being able to type
current_record.full_name == last_record.full_name
instead
...
finally:
f.close()
Obviously it doesn't substitute catching with 'except', but I don't
see how it could disturb that.
Cheers,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
is still important area
of Python usage).
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
05-09-2009 Steven D'Aprano st...@remove-this-cybersource.com.au wrote:
On Fri, 04 Sep 2009 22:37:15 +0200, Jan Kaliszewski wrote:
Named tuples (which indeed are really very nice) are read-only, but the
approach they represent could (and IMHO should) be extended to some kind
of mutable objects
to using
the __main__ idiom (i.e. 'if __name__ == __main__:' condition).
Cheers,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
app-logic
code in functions -- because, as we noted:
* in practice it is considerably faster,
* it helps you with using functions class browsers.
Cheers,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
it?
Cheers,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
04-09-2009 Ken Newton krnew...@gmail.com wrote:
I like this version very much. I'm ready to put this into practice to see
how it works in practice.
[snip]
Not only you (Ken) and me. :-) It appears that the idea is quite old. Nick
Coghlan replied at python-id...@python.org:
Jan Kaliszewski
work relatively the best with a powerful single
core; with more cores it becomes being suprisingly inefficient.
The culprit is Pythn GIL and the way it [mis]cooperates with OS
scheduling.
See: http://www.dabeaz.com/python/GIL.pdf
Yo
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http
(:)])]
[3]
Of course, you could also do something like this:
eval('x' + s)
or
eval(str(x) + s)
-- but it's worse: less secure (e.g. if s could be user-typed) and most
probably much more time-consuming (especially the latter).
Cheers,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http
Erratum:
eval(str(x) + s)
-- but it's worse: less secure (e.g. if s could be user-typed) and most
probably much more time-consuming (especially the latter).
There should be *repr* instead of *str*.
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman
recent call last):
File stdin, line 1, in module
ValueError: invalid literal for int() with base 10: ''
Similar problem with [2:].
Ideas?
x = [1,4,3,5,4,6,5,7]
s = '[3:6]'
x[slice(*((int(i) if i else None)
for i in s.strip([]).split(:)))]
Cheers,
*j
--
Jan
('booHoo')))
Cheers,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
, 5.7318859100341797]
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
31-08-2009 o 22:28:56 Jan Kaliszewski z...@chopin.edu.pl wrote:
setup = from itertools import starmap, imap ; from operator
import mul; import random, string; names = [rndom.choice(string.
ascii_letters) for x in xrange(1)]; hours = [random.randint(
1, 12) for x in xrange(1000)]; m = zip
PS. Sorry for sending 2 posts -- the latter is the correct one.
Cheers,
*j
--
http://mail.python.org/mailman/listinfo/python-list
such an unification would mean terrible impoverishment
of our (humans') culture and, as a result, terrible squandering of our
intelectual, emotional, cognitive etc. potential -- especially if such
unification were a result of intentional policy (and not of a slow and
'patient' process of synthesis).
*j
--
Jan
')
...but in such cases as copying existing objects it is usualy better
(though less romantic :-)) to use an ordinary function (e.g. simply
copy.copy() or copy.deepcopy(), as Gabriel has pointed).
Regards,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
that detail, I fully agree.
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
such recursive references in Python).
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
is to get all possible permutations of two lists given and
select any combination and use zip to get the tuples. Repeat this for
all possible combinations.
Any other ideas?
See: module itertools -- there are (OOTB) some combinatoric generators
that may be useful for you.
*j
--
Jan Kaliszewski (zuo
):
if n 2:
return 1
else:
return n * fact(fact, n - 1)
fact(fact, 3)
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
int.__add__(self, other) # can do something more interesting
47
48
49 if __name__ == '__main__':
50 d = VerboseDict()
51
52 print(d['a'] = 3)
53 d['a'] = MyInt(3)
54
55 print(d['a'] += 3)
56 d['a'] += MyInt(3)
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http
['a'] = MyInt(3)
54
55 print(d['a'] += 3)
56 d['a'] += MyInt(3)
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
*when it's called as a method*
(what is possible *after* creating the class = outside the definition).
Cheers,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
- ...)
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
that it too now fails with characters outside
the BMP.
[snip]
Does not this effectively make unichr() and ord() useless
on Windows for all but a subset of unicode characters?
Are you sure, you couldn't have UCS-4-compiled Python distro
for Windows?? :-O
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
21-08-2009 o 18:09:02 alex23 wuwe...@gmail.com wrote:
Unfortunately, apply() has been removed as a built-in in 3.x.
You can always implement it yourself :)
def apply(function, args=(), keywords={}):
return function(*args, **keywords)
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
it'd be also inconsistent with *Python* conventions, i.e.:
0x - hex prefix
0b - bin prefix
Cheers,
*j
--
Jan Kaliszewski (zuo) z...@chopin.edu.pl
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 155 matches
Mail list logo