"Alex Martelli" wrote
> Steve Holden wrote:
>...
> > >> Get yourself a stuffed bear, and next time you have this kind of
problem
> > >> spend a few minutes explaining to the bear exactly how your
program
> > >> can't possibly be wrong. Works like a charm.
> > >
> > > A rubber ducky works muc
Sorry for the mess,
The message should have been sent to the Czech
Python mailing list. My fault.
pepr
"Petr Prikryl" wrote...
> Ahoj všeci,
> Tak nějak prakticky poprvé se dostávám k tomu,
> jak přečíst unicode řetězce ze souboru, který
> je uložen ve formátu UTF-8 se s
Ahoj všeci,
Tak nějak prakticky poprvé se dostávám k tomu,
jak přečíst unicode řetězce ze souboru, který
je uložen ve formátu UTF-8 se signaturou
na začátku (BOM). Nějak se mi nedaří.
Mám takovýto soubor.txt v UTF-8 s BOM
=
První řádek.
Druhý řádek.
Třetí řáde
Do you think that the following could became PEP (pre PEP).
Please, read it, comment it, reformulate it,...
Abstract
Introduction of the mechanism for language extensions via
modules written using other languages. Extensions of
Python could be done via special interpreter extensions.
F
"zefciu" wrote in message news:[EMAIL PROTECTED]
> Where can I find a good explanation when does an interpreter copy the
> value, and when does it create the reference. I thought I understand
> it, but I have just typed in following commands:
>
> >>> a=[[1,2],[3,4]]
> >>> b=a[1]
> >>> b=[5,6]
> >>
"yaru22" wrote in message
news:[EMAIL PROTECTED]
> In one of the examples in the book I'm reading, it says:
>
> def __init__(self):
> ...
> return
>
> It has nothing after "return". I expected it to have some number like 0
> or 1. What does it mean to have nothing after return?
Yes, it ha
"Chris Uppal" wrote:
> Petr Prikryl wrote:
>
> > for element in aCollection:
> > if element > 0:
> > return True
> > return False
>
> [I'm not sure whether this is supposed to be an example of
"Chris Uppal" wrote...
> Alex Martelli wrote:
>
> > I think it's reasonable to make a name a part of functions, classes and
> > modules because they may often be involved in tracebacks (in case of
> > uncaught errors): to me, it makes sense to let an error-diagnosing
> > tracebacks display package
"Alex Martelli" wrote...
> Joe Marshall wrote:
>...
> > If you language allows unnamed integers, unnamed strings, unnamed
> > characters, unnamed arrays or aggregates, unnamed floats, unnamed
> > expressions, unnamed statements, unnamed argument lists, etc. why
> > *require* a name for trivia
"Fredrik Lundh" wrote:
> Alex Martelli wrote:
>
> > > But of course that only does it once, and I don't want to have to copy
> > > and paste the append line. Perhaps there's a better way than this.
> >
> > def makeseries(N):
> > series = [N]
> > append = series.append
> > for tailer in xrang
I have added some spaces guessing how the original was formatted.
See the simplified example and the explanation below...
"Sean Givan" wrote...
> Hi. I'm new to Python [...] something strange.
> This code:
>
> def outer():
> val = 10
> def inner():
> print val
> inner()
> outer()
>
> ..pr
rainbow.cougar wrote in message
> okay wrote:
> > To Archbishop Christodoulos Paraskevaides of the Greek Orthodox Church
> > in Athens and Greece Archbishop,
> > I talked with a Greek Orthodox believer in Australia and he told me two
>
> I'm thinking a list comprehension...
Possibly some filter(m
"John Salerno" wrote...
[...]
> So a class method is specifically for using the class name itself as an
> object in the method? If that's the case, then it makes some sense now.
> I guess the reason I didn't get it before is that this is a feature of
> dynamic languages, right? And something that
"Aahz" wrote...
> Bruno Desthuilliers wrote:
> >Aahz a écrit :
[...]
> >>>Please repeat this 101 times each morning:
> >>>"thou shall not use old-style classes for they are deprecated".
> >> Classic classes are *NOT* deprecated.
> >Perhaps not *officially* yet...
>
> Not even unofficially. The poi
the hint.
Martin v. Löwis wrote
> Petr Prikryl wrote:
> > Martin v. Löwis wrote
> > > As for dropping the u prefix on string literals:
> > > Just try the -U option of the interpreter some time,
> > > which makes all string literals Unicode. If you manage
> >
"Martin v. Löwis" once (20 Sep 2005) wrote in reply
to my question...
Simpler transition to PEP 3000 "Unicode only strings"?
> As for dropping the u prefix on string literals:
> Just try the -U option of the interpreter some time,
> which makes all string literals Unicode. If you manage
> to
, is there something similar with 3 states
available around?
Thanks for your time and experience,
pepr
--
Petr Prikryl (prikrylp at skil dot cz)
--
http://mail.python.org/mailman/listinfo/python-list
Thanks, Martin v. Löwis, Neil Hodgson, and Tim Roberts.
I really appreciate your valuable comments. It simply
works.
Thanks again,
Petr
"Neil Hodgson" wrote...
> Petr Prikryl:
>
> > I do not understand what encoding should be used
> > to convert the sys.ar
. Still, how the sys.argv is filled? What
encoding is used when parsing the cmd line internally?
To what encoding is it converted when non ASCII
characters appear?
Thanks for your time and experience,
pepr
--
Petr Prikryl (prikrylp at skil dot cz)
--
http://mail.python.org/mailman/listinfo
in UTF-8 (or
other recognised Unicode file format), then the
encoding declaration must reflect the format or
can be omitted entirely. In such case, all
simple string literals will be treated as
unicode string literals.
Would this break any existing code?
Thanks for your time and experience
Try also the Bruce Eckel's "Thinking in C++".
It is also available on-line for free at
http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html
I like the book because it explains the things
very clearly. After reading it, one will stop
to think and say that C++ is "only C with
strange OO things
.pop(0) # get and remove the first
element
if 'bar' in bar and 'baz' in bar:
bars.insert(0, bar) # insert the tested back
break # and finish
print bars
The result is ['barbaz', 'foobar'] in both cases.
Petr
--
Petr Prikryl (prikrylp at skil dot cz)
--
http://mail.python.org/mailman/listinfo/python-list
es.
Could you confirm the bug? Is it known?
Should this be posted into some bug-report list?
Petr
python test.py
I have observed t
--
Petr Prikryl (prikrylp at skil dot cz)
test.py
Description: test.py
<>--
http://mail.python.org/mailman/listinfo/python-list
rary functions are anonymous
> or not).
> [...]
I believe that GvR has a lot of experience and he proved
to be very pragmatic. If he thinks that lambdas bring more
problems than they solve, it may be some truth in it.
I also believe that lamda-trained programmers think
a bit differently
i problem invisibility
in Python. But I had to learn by mistake. The ++i
behaviour is not intuitive for me.
Your opinion?
--
Petr Prikryl (prikrylp at skil dot cz)
--
http://mail.python.org/mailman/listinfo/python-list
you are already used
to it.
>
> >>> i = 1
> >>> i +=1
> >>> i
> 2
>
> I like this one better, because you see the assignment at once, it is
> easy to read and inuitive usability is given - in my opinion.
> Chris
>
>
>
>
> P
26 matches
Mail list logo