On 21 окт, 13:50, Ian Kelly wrote:
> On Thu, Oct 20, 2011 at 10:17 PM, Yosifov Pavel wrote:
> > Little silly example:
>
> > class MyFile(file):
> > šdef __init__(self, *a, **ka):
> > š šsuper(MyFile, self).__init__(*a, **ka)
> > š šself.commented =
On 21 окт, 00:42, Ian Kelly wrote:
> On Thu, Oct 20, 2011 at 11:28 AM, Yosifov Pavel wrote:
> > In the Python 2.x was simple to create own file object:
>
> > class MyFile(file):
> > špass
>
> > for example to reimplement write() or something else. How to do it in
In the Python 2.x was simple to create own file object:
class MyFile(file):
pass
for example to reimplement write() or something else. How to do it in
Python 3.x?
--
http://mail.python.org/mailman/listinfo/python-list
I try to create type aliases, like typedef in C (a specially aliases
to ctypes objects). This case:
>>> some_type = c_ulong
>>> oth_type = c_ulong
works in all cases but not with type qualification:
>>> t1 = c_ulong # reference to c_ulong, nothing else :(
>>> t2 = c_ulong
>>> x = t1()
>>> y = t2
On 16 июл, 11:32, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Tue, 15 Jul 2008 19:54:30 -0700, Yosifov Pavel wrote:
> > Kay, can you show example of such generator? ReIter, for example, work
> > with usual generators.
>
> > But for "bi
Kay, can you show example of such generator? ReIter, for example, work
with usual generators.
But for "big" iterator, I think is no any good solutions. IMHO we can
discern 2 types of iterators: re-startable (based on internal Python
objects) and not re-startable (with an external state, side-
effe
On 14 июл, 23:36, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> On 13 juil, 12:05, Yosifov Pavel <[EMAIL PROTECTED]> wrote:
> (snip)
>
> > defcloneiter( it ):
> > """return (clonable,clone)"""
> > return tee
> `tee()` doesn't copy the iterator or its internal state but just caches
> it's results, so you can iterate over them again. That makes only sense
> if you expect to use the two iterators in a way they don't get much out of
> sync. If your usage pattern is "consume iterator 1 fully, and then
> r
> Well, I think Python's iterators, especially the generators, are beautiful.
> More importantly, I think there is no general way to make iterators
> copyable, regardless of the programming language. The problem is that most
> of the useful ones depend on external state.
>
> Peter
Hmm, but tee() d
On 13 июл, 14:12, Peter Otten <[EMAIL PROTECTED]> wrote:
> Yosifov Pavel wrote:
> > Whats is the way to clone "independent" iterator? I can't use tee(),
> > because I don't know how many "independent" iterators I need. copy and
> > deepcop
Whats is the way to clone "independent" iterator? I can't use tee(),
because I don't know how many "independent" iterators I need. copy and
deepcopy doesn't work...
--pavel
--
http://mail.python.org/mailman/listinfo/python-list
On 24 май, 12:58, bukzor <[EMAIL PROTECTED]> wrote:
> On May 23, 6:31 pm, Yosifov Pavel <[EMAIL PROTECTED]> wrote:
>
> > Does somebody know existent tool for checking unhandled exceptions?
> > Like in Java when method throws exception but in code using this
> >
Does somebody know existent tool for checking unhandled exceptions?
Like in Java when method throws exception but in code using this
method, try...catch is missed. May be something like PyChecker?
--
/Pavel
--
http://mail.python.org/mailman/listinfo/python-list
13 matches
Mail list logo