why shouldn't += work?
Ultimately, there is no right answer, because the multitude of
requirements are contradictory. No matter what Python did, somebody would
complain.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
p/syncless/
http://opensource.hyves.org/concurrence/
http://www.tornadoweb.org/
http://docs.python.org/library/asyncore.html
http://pyro.sourceforge.net/
http://wiki.python.org/moin/ParallelProcessing
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
he problem go away?
If you perturb your script (add a few blank lines at the end, or a
comment), does it go away?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
")"
If that were the case, the module wouldn't run at all, it would
consistently raise SyntaxError before running.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 04 Feb 2012 10:32:25 -0600, Andrew Berg wrote:
> On 2/3/2012 5:25 PM, Steven D'Aprano wrote:
>> Which version of Python, which version of Windows?
> I keep that information in my signature for every post I make to this
> list. CPython 3.2.2 | Windows NT 6.1.7601.17640
linker.
>>>
>>> Unfortunately neither install on my computer, with a PATH with the
>>> following:
>>>
>>> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC
>>> C:\libraries\MinGW\msys\1.0\bin
>>> C:\libraries\MinGW
>>> C:\Py
eed; seed(42);
print(choice(list(range(1000"
639
steve@runes:~$ python3.1 -c "from random import choice, seed; seed(1);
print(choice(list(range(1000"
134
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 06 Feb 2012 00:07:04 -0500, Terry Reedy wrote:
> On 2/5/2012 11:01 PM, Steven D'Aprano wrote:
>
>> Reading the docs, I would expect that when using an int as seed, you
>> should get identical results.
>
> That is similar to expecting hash to be consistent f
the convenience
> transformations can be changed if improvements are needed or thought
> sufficiently desirable.
A more explicit note will help, but the basic problem applies: how do you
write deterministic tests given that the random.methods (apart from
random.random itself) can be changed
[1, 'a', 'A', 2, 'b', 'B', 3, 'c', 'C', 4, 'd', 'D', 5, 'e']
>>> collate(seq, 3)
[[1, 2, 3, 4, 5], ['a', 'b', 'c', 'd', 'e'], ['A', 'B', 'C', 'D']]
>>> collate(seq, 2)
[[1, 'A', 'b', 3, 'C', 'd', 5], ['a', 2, 'B', 'c', 4, 'D', 'e']]
>>> collate(seq, 9)
[[1, 4], ['a', 'd'], ['A', 'D'], [2, 5], ['b', 'e'], ['B'], [3], ['c'],
['C']]
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
I basically given vaporware? Does anyone have any up to date info?
>
> Have you considered Ruby on Rails?
Now that's just cruel.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
no way to implement one that doesn't suck?
Because it's a solution in search of a problem?
Actually, that's unfair. A write-once dict would be awesome for providing
read-only constants, if only there were some way to set a namespace to
using non-builtin dicts.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
ing inside a function is that there can
sometimes be strange effects with threads, or so I've been told, but I
couldn't begin to explain exactly what (allegedly) can go wrong.
> I still think readability trumps all the other reasons, for nearly all
> programs.
Which is a good reason fo
want to make a copy, then I recommend your trick of generating the
indexes:
def cycle(seq, n):
for indexes in (xrange(n, len(seq)), xrange(n)):
for i in indexes:
yield seq[i]
If your data is humongous but only available lazily, buy more memory :)
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
all over the place. We have
properties, which can easily create read-only and write-once attributes.
We have descriptors which can be used for the same. We have immutable
types, and constant values, but not constant names.
Python can enforce all common software contracts I can think of, except
the contract that a name will be set to a specific value. And that is, in
my opinion, a weakness in Python.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
dicts.
http://securitytracker.com/id/1026478
http://bugs.python.org/issue13703
If there is anyone still assuming that dicts have a predictable order,
they're going to be in for a nasty surprise one of these days.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 09 Feb 2012 22:27:50 -0500, Terry Reedy wrote:
> On 2/9/2012 8:04 PM, Steven D'Aprano wrote:
>
>> Python happily violates "consenting adults" all over the place. We have
>> properties, which can easily create read-only and write-once
>> attributes.
e fine. In Python 3 I get an
error. What should I do that requires no thought?"
Obvious answers:
- Try decoding with UTF8 or Latin1. Even if you don't get the right
characters, you'll get *something*.
- Use open(filename, encoding='ascii', errors='surrogateescape')
(Or possibly errors='ignore'.)
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
ords and documents and files to deal with. Encodings are
not going away.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
ou stick to nothing but Windows, because
Windows' default encoding is localised: a file generated in (say) Israel
or Japan or Germany will use a different code page (encoding) by default
than one generated in (say) the US, Canada or UK.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
approximately -1.00572223991.)
I know that Newton's method is subject to cycles, but I haven't found any
discussion about Halley's method and cycles, nor do I know what the best
approach for breaking them would be. None of the papers on calculating
the Lambert W function that I have found mentions this.
Does anyone have any advice for solving this?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 12 Feb 2012 01:05:35 -0600, Andrew Berg wrote:
> On 2/12/2012 12:10 AM, Steven D'Aprano wrote:
>> It's not just UTF8 either, but nearly all encodings. You can't even
>> expect to avoid problems if you stick to nothing but Windows, because
>> Windows
On Sun, 12 Feb 2012 05:11:30 -0600, Andrew Berg wrote:
> On 2/12/2012 3:12 AM, Steven D'Aprano wrote:
>> NTFS by default uses the UTF-16 encoding, which means the actual bytes
>> written to disk are \x1d\x040\x04\xe5\x042\x04 (possibly with a leading
>> byte-order mark
On Sun, 12 Feb 2012 12:11:46 -0500, Roy Smith wrote:
> In article ,
> Dennis Lee Bieber wrote:
>
>> On Sun, 12 Feb 2012 10:48:36 -0500, Roy Smith wrote:
>>
>> >As Steven D'Aprano pointed out, it was missing some commonly used US
>> >symbols such
ce/generated/
scipy.special.lambertw.html
Naturally I thought "I can do better than that". Looks like I can't :)
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
en I ran Mac OS 6, I had memorised many keyboard
shortcuts for these things. Option-4 was the pound sign, I believe, and
Option-Shift-4 the cent sign. Or perhaps the other way around?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 12 Feb 2012 12:18:15 -0800, Mark Dickinson wrote:
> On Feb 12, 6:41 am, Steven D'Aprano [email protected]> wrote:
>
>> err = -a/b # Estimate of the error in the current w.
>> if abs(err) <= 1e-16:
>>
l just as many bytes as it is characters, and everybody will be happy
> again.
I think you mean 4 times as many bytes as characters. Unless you have 32
bit bytes :)
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
hon/download/Descriptor.htm
And I'll take this opportunity to plug my dualmethod descriptor:
http://code.activestate.com/recipes/577030-dualmethod-descriptor/
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
gt; You are only born with one
> guarantee; you will die, guaranteed! Any questions?
Yes. Why haven't you moved to a libertarian paradise like Somalia yet?
You'd like it there. There are two sorts of people: those who can afford
their own private militia, and victims.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 13 Feb 2012 08:01:59 -0800, Rick Johnson wrote:
> Evolution knows how to handle degenerates.
And yet here you still are.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
on? Please don't
disappoint your millions of fans!
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
ple second
chances (and apparently third and fourth and fifth chances). Methinks
it's time for Monsieur Johnson to go back in the killfile.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
ns by
site.py.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
/(log n)**2). Regardless of the exact Big Oh
behaviour, it is going to be SLOW for large values of n.
The behaviour of append is the least of your concerns.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
it, then
paste it into the input buffer to be processed.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
support choosing a shell, you can't use anything but
the built-in shell regardless of what Python does.
Either way, this is not a Python problem to solve. It is an OS issue.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
nfig file is -- is it an
INI file, XML, JSON, YAML, Unix-style rc file, a binary pickle, or
something else?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
ng your code is double-plus good for maintainability. You should
do it anyway. But don't do it to shrink an 11MB exe down to 10.8MB.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
nt an environment where the tools don't
mix content and presentation by default."
"My OS has a shell which sucks and blows at the same time. I want
something better."
So basically, there exists a niche for Python as a shell, and thanks to
the time machine, there already exists a powerful Python shell ready to
fill that niche.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
l-as-always-ly y'rs,
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
bad practice?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
rator():
... if p > 1: break
... return time() - t
...
py> test(pyprimes.primes)
0.013000965118408203
py> test(pyprimes.naive_primes1)
4.1489889621734619
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
stutils/command/bdist_wininst.py", line 262,
in create_exe
cfgdata = cfgdata.encode("mbcs")
LookupError: unknown encoding: mbcs
How do I fix this, and is it a bug in distutils?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
ies on, the right answer is usually:
"Don't do that then."
Python doesn't try to prevent people from shooting themselves in the foot.
Monkey-patching-by-actual-monkeys-for-fun-and-profit-ly y'rs,
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 23 Feb 2012 07:09:35 -0800, jmfauth wrote:
> On 23 fév, 15:06, Steven D'Aprano [email protected]> wrote:
>> Following instructions here:
>>
>> http://docs.python.org/py3k/distutils/builtdist.html#creating-
windows...
>>
>> I am t
On Fri, 24 Feb 2012 00:11:11 +, Steven D'Aprano wrote:
> On Thu, 23 Feb 2012 07:09:35 -0800, jmfauth wrote:
>
>> On 23 fév, 15:06, Steven D'Aprano > [email protected]> wrote:
>>> Following instructions here:
>>>
>>> http:/
you need: the addition of one extra line, to initialise the loop
variable i (and, if you need it, x) before hand.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
abs instead of spaces, but since that's not going to
happen, I can interoperate better with the mass of broken tools out
there, and with other people, by using spaces.
I wonder whether Windows users tend to be more sympathetic to tabs than
Unix/Linux users, and if so, I wonder what if anything that means.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
3k/library/turtle.html#demo-scripts
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
k me a long time to stop thinking that the else clause executes when
the for loop was empty.
In Python 4000, I think for loops should be spelled:
for name in iterable:
# for block
then:
# only if not exited with break
else:
# only if iterable is empty
and likewise for whil
ther: isinstance(other, type(self))
__ne__ = __gt__ = lambda self, othr: not isinstance(othr, type(self))
__lt__ = lambda self, other: False
__ge__ = lambda self, other: True
__hash__ = lambda self: 42
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
un not
intended), and it is quite common to store them in variables:
for cls in (int, float, Decimal, Fraction, myint, myfloat):
do_something_with(cls)
Other languages may choose to use illogical terminology if they choose.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
e-200 * -1e-200
-0.0
and well-written functions should honour those separate zeroes because
sometimes it makes a difference.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 25 Feb 2012 00:39:39 +, Mark Lawrence wrote:
> On 24/02/2012 22:25, Steven D'Aprano wrote:
>> On Fri, 24 Feb 2012 10:08:43 -0800, David wrote:
>>
>>> Your code updated to show the difference between a variable, a class
>>> variable, and an instan
argument that this is useful and should be part of the Python built-ins.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
999ap+0'
>>>>
>>>>
> jmf
What's your point? I'm afraid my crystal ball is out of order and I have
no idea whether you have a question or are just demonstrating your
mastery of copy and paste from the Python interactive interpreter.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
at part of the
behaviour actually experienced contradicts the documented behaviour of
webbrowser.open()?
http://docs.python.org/library/webbrowser.html
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 26 Feb 2012 14:23:43 +0800, Leo wrote:
> On 2012-02-26 11:36 +0800, Steven D'Aprano wrote:
>> What part of this do you think is the bug, and why? What part of the
>> behaviour actually experienced contradicts the documented behaviour of
>> webbrowser.open()?
&g
ly, it
> can't be both a release candidate *and* released.
What do you believe the words imply?
I believe that they imply that the version is a candidate to be a
production-ready release of the software, as opposed to a pre-alpha,
alpha or beta version, but not yet the production-ready version.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
(flag1), bool(flag2) # normalise to booleans
>>> test(0, '')
(False, True)
So the two forms will take opposite branches of the if statement when
maxlength is 0 and string is the empty string.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
tring.
Or to make this painfully complete: some_string is a name linked to a
value which can vary (hence a variable) intended to be limited to strings
(hence a string variable). Python may not enforce this to the same extent
as C or Haskell or Pascal, but the concept still holds.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
do_something()
This can be simplified to:
def confine_length(string, maxlength=None):
if maxlength is None or len(string) <= maxlength:
do_something()
Or even simpler:
def confine_length(string, maxlength=float('inf')):
if len(string) <= maxlength:
.java.programmer/Floating-point-roundoff-error
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
al values, say, BIGGEST and
SMALLEST, which compare larger and smaller to any other value, regardless
of type and including strings, not literally a string with an infinite
number of characters.
I can see some value for this as a convenience, but not enough to make it
a built-in language feature.
w I can't access the
> camera.
[...]
Check your web proxy and firewall.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 28 Feb 2012 22:36:56 +1100, Ben Finney wrote:
> Steven D'Aprano writes:
>
>> On Sun, 26 Feb 2012 19:47:49 +1100, Ben Finney wrote:
>>
>> >> An integer variable is a variable holding an integer. A string
>> >> variable is a variable holdin
On Tue, 28 Feb 2012 23:41:16 +, Mark Lawrence wrote:
> I've been told of by the BDFL for stating that
> people should not top post on any Python mailing list/news group.
He's the BDFL of Python, not of mailing list etiquette.
--
Steven
--
http://mail.python.org/mailman
iller language, the identifiers "foo"
and "bar" will be reserved words, never used, and not even
mentioned in the reference manual. Any program using one will
simply dump core without comment. Multitudes will rejoice.
-- Tim Peters, 29 Apr 1998
--
Steven
--
ioms. You don't need a temporary variable to swap two values in
Python. A better way to reverse a list using more Pythonic idioms is:
for i in range(len(list_a)//2):
list_a[i], list_a[-i-1] = list_a[-i-1], list_a[i]
But the best way (even more idiomatic and much, much faster) is this:
list_a.reverse()
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
essage twice? It's very annoying.
There is no need to C.C. python-list because comp.lang.python is the
mirror of the mailing list.
Thank you.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
hat will work, or delegation, or composition. But given the toy
example you have shown, I don't know what that might be. If you explain
what you are actually doing, perhaps someone can suggest a better
solution.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 02 Mar 2012 16:15:47 +1100, Cameron Simpson wrote:
> Sorry, little technical content here, just a newly hatched programmer:
>
> duck typing, an intro
> http://www.flickr.com/photos/cskk/6799351990/in/photostream/
I love it! Excellent!
--
Steven
--
http://mail.python
I need to do to have Python 3.2 use tcl/tk 8.5?
I have installed tcl/tk 8.5.11 from source, and the binaries are here:
/usr/local/lib/libtcl8.5.so
/usr/local/lib/libtk8.5.so
In the Python 3.2 source, I do the usual:
./configure
make
sudo make altinstall
(altinstall to avoid nuking
On Sat, 03 Mar 2012 10:17:40 -0800, Westley Martínez wrote:
> On Sat, Mar 03, 2012 at 05:36:52PM +0000, Steven D'Aprano wrote:
>> I'm trying to re-build Python 3.2 with support for TCL/TK 8.5, but when
>> I run "make" I get this message:
>>
>
On Sat, 03 Mar 2012 17:06:39 -0800, Westley Martínez wrote:
> On Sun, Mar 04, 2012 at 12:50:53AM +0000, Steven D'Aprano wrote:
>> Okay, now I'm making progress... if I remove the previously existing
>> _tkinter in lib-dynload, and re-run "make", I get somet
for more information.
>>>
>>> class Test:
... def __call__(self):
... return 42
...
>>>
>>> x = Test()
>>> x()
42
Perhaps if you show us what you actually do, and what happens, we might
be able to tell you what is happening. Please COPY AND PASTE the full
traceback.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
ut I did not find solution there.
>
> It will be really helpful If somebody here can show me the direction to
> go?
What file format is the graphic in? How big is it?
What file format do you want it to be?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
x27;t worth
it.
Which is a pity, because I gather that Rick actually does know Tkinter
well. But dealing with him is like wrestling with a pig:
"I learned long ago, never to wrestle with a pig. You get dirty, and
besides, the pig likes it." -- George Bernard Shaw
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
e.dumps(c)
py> C.b = 42 # add a new class attribute
py> d = pickle.loads(pickled)
py> d.a
23
py> d.b
42
Unless you mean something different from this, adding attributes to the
class is perfectly fine.
But... why are you dynamically adding attributes to the class? Isn't tha
ckduckgo.com/html/?q=python%20htmllib%20tutorial
Also, you're still double-posting.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
are all free software, so the only
cost is your time), and decide for yourself which one meets your needs.
We can't answer that, because we don't know what you need.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
by using:
if type(s) is unicode: ...
instead of
if isinstance(s, unicode): ...
Consequently, when the library passes a unicode *subclass* to the
tounicode function, the "type() is unicode" test fails. That's a bad bug.
It's arguable that the library shouldn't even use isinstance, but that's
an argument for another day.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
e no decoding happens anyway.
I don't believe that it is the job of unicode() to Do What I Mean, but
only to Do What I Say. If I *explicitly* tell unicode() to decode the
argument (by specifying either the codec or the error handler or both)
then it should not double-guess me and ignore t
ite-packages/urllib2_file.py:
Permission denied
I note also that Chris' final comment was:
"In any case, you generally need to `sudo` when installing stuff system-
wide."
which is probably the solution the OP is looking for.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
ters, and the str type was still based on
bytes, with explicit support for non-ASCII values:
steve@runes:~/Downloads/python-0.9.1$ ./python0.9.1
>>> print 'This is *not* ASCII \xCA see the non-ASCII byte.'
This is *not* ASCII � see the non-ASCII byte.
Any conversion from bytes (including Python 2 strings) to Unicode is
ALWAYS a decoding operation. It can't possibly be anything else. If you
think that it can be, you don't understand the relationship between
strings, Unicode and bytes.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
ile ham.py
x = 23
def func():
a = 23
return a + 19
# file = spam.py
def func():
return 42
tmp = 19
x = 4 + tmp
del tmp
do you expect spam.pyc and ham.pyc to count as "the same"?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 11 Mar 2012 12:15:11 +1100, Chris Angelico wrote:
> On Sun, Mar 11, 2012 at 9:52 AM, Steven D'Aprano
> wrote:
>> On Sat, 10 Mar 2012 15:48:48 +0100, Gelonida N wrote: Define
>> "identical" and "the same".
>>
>> If I compile these
ecode("cp932", "backslashreplace")
=> r'aaa--騷--\xe9\x21--bbb'
and similarly for xmlcharrefreplace.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
ver takes your fancy.
Personally, I used "raise X" to mean "this doesn't need arguments and
should never have any" and "raise X()" to mean "this needs arguments but
I'm too lazy to provide them right now". Think of it as a FIXME.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
line. I found that def
> abcdeef\
> dddaaa(self):
> pass
>
> does not work, but
> def \
> abcsajfoijfiawifoiwejfoi(self):
> pass
>
> works. Is this the only way to do it?
Yes. You can't split tokens over multiple lines, or put any whitespace
between them.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
eve@runes:~$ python2.6
Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> raise StopIteration("out of fuel")
Traceback (most recent call last):
File "", line 1, in
StopIteration: out of fuel
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
at there is a way to
over-rule the type-inference, there is no need to declare types in the
common case. Explicit declarations should be used only for the uncommon
cases where type inference cannot cope.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
method in theory, but I
can't see any way to actually get one in practice.
In Python, and probably most languages, a bare, unadorned "method" is
implied to be an instance method; "instance method" is (possibly) a
retronym to distinguish them from other, newer(?), types
g out punctuation is a real
pessimation: an example of being "penny wise and pound foolish".
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
acket:
py> x = [
... 1, 2, 3,
... 4, 5, 6,
... 7, 8, 9,
... 10, 11, 12,
... 13, 14, 15
... ]
py> x
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
Indentation is only syntactically significant in blocks and statements.
> I like it because it reads like a tree.
Funny. I dislike it because it is a tree on its side.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
eep reading?
>From what you have show, and the sample chapters on the link above, I am
impressed. The author is aiming to teach basic concepts and impart
*understanding* rather than just force-feed the reader idioms which would
be incomprehensible to them. Vern Cedar (the author) is an actual
professional teacher, and from the samples I have seen, he knows what he
is doing.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
esult = []
for i in range(len(list1)):
result.append(list1[i] + list2[i])
is likely to be simpler to understand.
The downside is that experienced programmers may roll their eyes at how
you are dumbing down the code, or worse, accusing you of deliberately
misrepresenting the language.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
inal Hypercard GUI.)
I think Python is pretty close to the top of the readability versus
expressiveness curve.
That's not to say that Python is the optimal combination, or can't be
improved, or even that every language should compromise expressiveness
for comprehensibility (or vice versa).
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
We are getting the following error during a 'make' process on a CentOS
release 5.4 system:
Running mkfontdir...
Creating SELinux policy...
/usr/bin/python: error while loading shared libraries:
libpython2.4.so.1.0: cannot open shared object file: No such file or
directory
However, we
1301 - 1400 of 15552 matches
Mail list logo