On Oct 1, 10:41 pm, Eric Snow ericsnowcurren...@gmail.com wrote:
Anyone know the story behind the lower-case names for the
non-exception built-in types (like list and type)? I am guessing that
they were originally factory functions that, at some point, graduated
to full types; and the names
On Oct 2, 4:43 pm, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
In all cases, we can be sure that the contradiction between the pair of
statements are genuine contradictions and not mere apparent
contradictions caused by narrow perspective or incomplete or erroneous
knowledge.
On Oct 3, 2:14 pm, Dave Angel da...@ieee.org wrote:
Like it or not, there are plenty of globals already there, one of them
being __name__ . All the built-ins are effectively global, and so
is any function they define at top-level.
I keep wondering if that was another PyWart? I believe (and
On Oct 3, 2:55 pm, galyle gal...@gmail.com wrote:
Hello, I'm trying to build a menu which provides suggestions to a user
based on input to an entry. I have done something like this before
using Tcl/Tk, so I expected that it would work without much difficulty
with Tkinter. I was wrong.
Why
On Oct 3, 11:27 am, Chris Angelico ros...@gmail.com wrote:
PhysicsExpert: Super-speed wouldn't work, the acceleration required to
achieve it would burn up his surroundings!
For some definition of super-speed i suppose. Since we're bouncing
around the relatives here we need to consider this one
On Oct 2, 12:36 pm, markolopa marko.lopa...@gmail.com wrote:
Examples of information I would store in such a tree/table system
(which are now in spreasheets):
- My dvd, avi collection: The tree would be the directory tree of the
file system where I store my movies. For each directory
On Sep 29, 10:05 pm, alex23 wuwe...@gmail.com wrote:
On Sep 30, 9:37 am, MRAB pyt...@mrabarnett.plus.com wrote:
alex23:
And like the Bible, the Zen was created by humans as a joke. If you're
taking it too seriously, that's your problem.
Strangely, calling the bible self-contradictory
On Sep 29, 11:49 pm, Ian Kelly ian.g.ke...@gmail.com wrote:
Nope, that doesn't work.
{0:010}.format(-1234)
'0-1234'
The whole point of zfill is that it handles signs correctly.
py {0:-010d}.format(-1234)
'-01234'
My point was: Use the {char}{repeat}d format for integers and the
Note: I am quoting Passiday to get this thread back on subject
however my reply is for alex23 the philosopher
On Sep 29, 9:50 pm, alex23 wuwe...@gmail.com wrote:
On Sep 29, 10:23 pm, rantingrick rantingr...@gmail.com wrote:
What is so bad about breaking code in obscure places?
Try coding
On Sep 30, 11:36 am, Westley Martínez aniko...@gmail.com wrote:
On Fri, Sep 30, 2011 at 09:22:59AM -0700, rusi wrote:
On Sep 30, 8:58�pm, Neil Cerutti ne...@norwich.edu wrote:
On 2011-09-30, DevPlayer devpla...@gmail.com wrote:
I still assert that contradiction is caused by narrow
On Sep 29, 5:37 am, Passiday passi...@gmail.com wrote:
Here's a summary of what I take from this longwinded thread:
Read the Zen of Pthon for some fun:http://www.python.org/dev/peps/pep-0020
Read the PEP-8 for some good
guidelines:http://www.python.org/dev/peps/pep-0008
That's the point of
On Sep 29, 7:23 am, rantingrick rantingr...@gmail.com wrote:
A specific method for padding a string with ONLY zeros is ludicrous
and exposes the narrow mindedness of the creator. The only thing worse
than zfill as a string method is making zfill into built-in
function! The ONLY proper place
On Sep 29, 5:12 pm, Ian Kelly ian.g.ke...@gmail.com wrote:
On Thu, Sep 29, 2011 at 6:23 AM, rantingrick rantingr...@gmail.com wrote:
A specific method for padding a string with ONLY zeros is ludicrous
and exposes the narrow mindedness of the creator. The only thing worse
than zfill
On Sep 29, 6:07 pm, Devin Jeanpierre jeanpierr...@gmail.com wrote:
However, as you use the new format method you will come to appreciate
it. It's an adult beverage with an acquired taste. ;-)
Yeah. It's a much more difficult to read thing, but once you learn how
to write it it flows faster.
On Sep 29, 5:12 pm, Ian Kelly ian.g.ke...@gmail.com wrote:
On Thu, Sep 29, 2011 at 6:23 AM, rantingrick rantingr...@gmail.com wrote:
A specific method for padding a string with ONLY zeros is ludicrous
and exposes the narrow mindedness of the creator. The only thing worse
than zfill
On Sep 29, 6:40 pm, Ethan Furman et...@stoneleaf.us wrote:
Okay, that's what I get for skimming -- it was alex23, not rr. My
apologies, rr, for the misattribution.
Oh don't worry Ethan, this is not the first time I've been falsely
accused, misquoted, and kicked in the testicles, and i'm quite
On Sep 27, 11:25 pm, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
The Python development team is relatively small and chronically busy: too
much to do and not enough time to do it.
If that is the case then why do they snub their noses at anyone who
wishes to help? What kind of
On Sep 28, 6:26 pm, Tim Johnson t...@akwebsoft.com wrote:
* DevPlayer devpla...@gmail.com [110928 04:31]:
On Sep 27, 10:25 pm, alex23 wuwe...@gmail.com wrote:
rantingrick rantingr...@gmail.com wrote:
Since, like the bible
the zen is self contradicting, any argument utilizing the zen
On Sep 27, 1:51 am, DevPlayer devpla...@gmail.com wrote:
By the way OP Passiday the title of the topic is Suggested coding
style.
Are you suggesting a coding style or asking for a Python coding style
or are you asking what IS the Python coding style.
If you are asking what is the Python
On Sep 24, 11:56 pm, Matt Joiner anacro...@gmail.com wrote:
Please continue
Well specifically we should have a look over the Ruby API's of File,
Dir, and IO. I don't believe we should copy them verbatim --as the
Ruby API is not Pythonic-- however, it may be a good starting point
for something
Here is a *very* rough outline of my ideas. There are probably a few
mistakes in there. I've decided on three main main objects. A File
object, a Path object, and a Dir object.
## START ENLIGHTENMENT ##
class Path:
def __init__(self, path):
#
# Properties about the path:
drive =
Oh the creative juices are flowing now!!!
class Path:
def __init__(self, path):
def __coerce__(self) = File or Dir
#
# Properties about the path:
drive = str
directory = str
filename = str
extension = str
##uncshare[1]= ???
#
# Mutations.
def
On Sep 22, 4:14 pm, Matt mattj.morri...@gmail.com wrote:
I'm curious about what people's opinions are about using mixins in
Python. I really like, for example, the way that class based views
were implemented in Django 1.3 using mixins. It makes everything
extremely customizable and reusable. I
On Sep 23, 10:36 pm, Fletcher Johnson flt.john...@gmail.com wrote:
The topic says it all:
Why is shutil named shutil? What does it stand for? This is just a
mild curiosity of mine.
The shutil module for
reference:http://docs.python.org/library/shutil.html#module-shutil
Because even after 20
On Sep 24, 3:57 am, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
class StandardTestMixin:
def test_requires_one_argument(self):
self.assertRaises(TypeError, self.func)
def test_has_docstring(self):
self.assertTrue(self.func.__doc__)
And this is
On Sep 22, 4:14 pm, Matt mattj.morri...@gmail.com wrote:
(although having only a single parent doesn't
make much sense either, I believe there are very few actual documented
cases of that happening).
There is nothing wrong with an object having only one parent. Most
times the reasons are for
On Sep 13, 10:45 am, Ian Kelly ian.g.ke...@gmail.com wrote:
Have you looked at the online itertools documentation at all?
http://docs.python.org/library/itertools.html
Yes the online docs are much better. I really like the source code
showing the inner workings of the methods. However i
# Quote #
# The itertools module is great HOWEVER i believe most #
# people are recreating the functionalities due to
On Sep 7, 10:56 am, bclark76 bclar...@gmail.com wrote:
I'm learning python, and was playing with structuring packages.
Basically I want to have a package called mypackage that defines a
number of classes and functions.
so I create:
mypackage
__init__.py
myfunc.py
MyClass.py
Hmm, i can replace all that code with this...
#
# Easy_as.py
#
import Tkinter as tk
from ScrolledText import ScrolledText
import tkFont
import random
# Create some puesdo data.
data = [
'{0}.{1}'.format(x, 'blah'*random.randint(4, 50))
for x in range(100)
]
##print data
# Create the
Or if you prefer the alternating background approach...
##
# Easy_as.py
##
import Tkinter as tk
from ScrolledText import ScrolledText
import tkFont
import random
END = 'end'
INSERT = 'insert'
#
# Create some puesdo data.
data = [
'{0}.{1}'.format(x,
On Sep 6, 1:27 pm, Fred Pacquier xne...@fredp.lautre.net wrote:
I'm a Python long-timer, but I've never had to use tools like Matplotlib
others before.
Now, for my work, I would need to learn the basics fast, for a one-time
quick-n-dirty job.
##
## START SCRIPT ##
On Sep 6, 5:00 pm, Bart Kastermans bkast...@gmail.com wrote:
rantingrick rantingr...@gmail.com writes:
Hmm, i can replace all that code with this...
Because I stupidly forgot to repeat the original problem I had, and my
code doesn't show it (and doesn't show the correct use of the function I
On Sep 6, 5:40 pm, rantingrick rantingr...@gmail.com wrote:
On Sep 6, 5:00 pm, Bart Kastermans bkast...@gmail.com wrote:
Take your input data and replace ALL single newlines with null strings
CORRECTION: Take your input data and replace ALL single newlines with
A SINGLE SPACE
--
http
On Sep 5, 10:06 am, Martin De Kauwe mdeka...@gmail.com wrote:
Hi,
If I wanted to print an entire module, skipping the attributes
starting with __ is there an *optimal* way? Currently I am doing
something like this. Note I am just using sys here to make the point
import sys
data = []
for
On Aug 31, 9:35 am, T. Goodchild tgoodch...@gmail.com wrote:
I’m new to Python, and I love it. The philosophy of the language (and
of the community as a whole) is beautiful to me.
Welcome aboard mate!
But one of the things that bugs me
Oh here we go! :-)
is the requirement that all class
On Sep 3, 11:50 am, Stephen Hansen me+list/pyt...@ixokai.io wrote:
Freedom is not and never has been, IMHO, a virtue or goal or even desire
in Python.
Exactly!
Where it occurs, it is at best a happy coincidence,
Exactly!
and even
if that happy coincidence happens often, it is not a
On Sep 4, 10:22 am, ron3200 ron3...@gmail.com wrote:
I think this is one of those areas where computers and people differ,
but it may also depend on the persons native language as to what works
better for them.
Yes but what works better for them is not always a better way of
doing things!
On Sep 4, 2:39 pm, Bart Kastermans bkast...@gmail.com wrote:
I get bits of information over RSS, these are of varying length. I
want to show 10 at a time, and scroll through them. Now when I
scroll the window grows and shrinks depending on their size, I want
to right from the start make it
On Sep 4, 2:39 pm, Bart Kastermans bkast...@gmail.com wrote:
Thx. That function should allow for a bit of robustness.
Correction. The function is actually tkFont.metrics(arg) which takes
linespace as an optional argument.
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 3, 5:15 pm, Bart Kastermans bkast...@gmail.com wrote:
Any suggestions?
Yeah, have you considered using the linespace() method of tk.Font
objects to calculate the height? Although i must say it feels as if
your doing something you should not need to do, however i cannot be
sure without
On Aug 27, 5:21 pm, Emile van Sebille em...@fenx.com wrote:
On 8/27/2011 2:57 PM Ben Finney said...
Emile van Sebilleem...@fenx.com writes:
Code is first and foremost written to be executed.
“Programs must be written for people to read, and only incidentally for
machines to
On Aug 26, 6:15 am, Roy Smith r...@panix.com wrote:
Maybe. In general, it's certainly true that a bunch of smallish
functions, each of which performs exactly one job, is easier to work
with than a huge ball of spaghetti code.
Obviously you need to google the definition of spaghetti code.
On Aug 26, 10:40 am, John Gordon gor...@panix.com wrote:
In 7b47ca17-d3f1-4d91-91d1-98421e870...@ea4g2000vbb.googlegroups.com
rantingrick rantingr...@gmail.com writes:
Furthermore: If you are moving code out of one function to ONLY be
called by that ONE function then you are a bad
On Aug 26, 4:45 pm, Chris Angelico ros...@gmail.com wrote:
On Sat, Aug 27, 2011 at 4:05 AM, rantingrick rantingr...@gmail.com wrote:
Now take a look at MY simple ONE module solution. It has JUST enough
methods and NOT a single more!
I disagree - create_widgets() is completely unnecessary
On Aug 26, 1:16 pm, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
(3) Fault isolation. If you have a 100 line function that fails on line 73,
that failure may have been introduced way back in line 16. By splitting the
function up into smaller functions, you can more easily
On Aug 24, 10:59 am, kangshu...@hotmail.com wrote:
Now I have a problem and I holp someone can help me.
def fib(x):
if x==0 or x==1: return 1
else: return fib(x-1) + fib(x-2)
This must be from How not to program. Was this a personal pick or
recommendation?
--
On Aug 24, 3:45 pm, Bill bsag...@gmail.com wrote:
My google-fu has failed me in finding info on %h and %l string
formatting codes.
Did it ever occur to you to peruse the docs?
http://docs.python.org/library/stdtypes.html#string-formatting-operations
Stop using the limited deprecated string
On Aug 23, 6:59 am, smith jack thinke...@gmail.com wrote:
i have heard that function invocation in python is expensive, but make
lots of functions are a good design habit in many other languages, so
is there any principle when writing python function?
for example, how many lines should form a
On Aug 23, 1:29 pm, Terry Reedy tjre...@udel.edu wrote:
In terms of different functions performed (see my previous post), I see
attribute lookup
assignment
enumerate
sequence unpacking
for-looping
if-conditioning
lower
startswith
return
That is 9, which is
On Aug 18, 8:39 am, Jason Staudenmayer
jas...@adventureaquarium.com wrote:
[snip irony]
Adventure Aquarium is America's Most Touchable Aquarium!
Featuring the ALL NEW Stingray Beach Club
Where you can touch and hand feed the gentle stingrays
To buy and print your tickets at home visit
On Aug 16, 2:07 am, alex23 wuwe...@gmail.com wrote:
All the way down indeed. Can you pick who said these?
Obviously your grep skills are superb however you need to brush up on
those reading and comprehension skills a bit.
There are noobs watching and we to provide code that can be used to
On Aug 16, 9:13 am, Philip Semanchuk phi...@semanchuk.com wrote:
Sometimes X is safe and sometimes it isn't can be said
of many, many things, from taking a walk down the street
to juggling with knives. But it has little to do with
whether or not Python should issue a warning in the
specific
On Aug 16, 1:49 am, alex23 wuwe...@gmail.com wrote:
On Aug 16, 2:37 pm, rantingrick rantingr...@gmail.com wrote:
The reading proceeds naturally from right to left.
Well, naturally if you're coding in Hebrew or Japanese perhaps :)
Yes :). I typo-ed that one. It was getting late when i sent
On Aug 16, 1:37 pm, Martin P. Hellwig martin.hell...@gmail.com
wrote:
Well admittedly English isn't my native language, But indeed all
sentences seem correct to me.
With the first sentence meaning: in the past I wore wooden shoes, but
presently I do not.
With the second sentence meaning:
On Aug 16, 4:55 pm, David Monaghan monaghand.da...@gmail.com wrote:
On Tue, 16 Aug 2011 13:13:10 -0700 (PDT), rantingrick
rantingr...@gmail.com wrote:
If conciseness is all you seek then perhaps you prefer the following?
ORIGINAL: I used to wear wooden shoes
CONCISE: I wore wooden shoes
On Aug 16, 6:25 pm, John Gordon gor...@panix.com wrote:
In d577aa97-84f1-48ac-91fd-4355059ca...@f7g2000vba.googlegroups.com
rantingrick rantingr...@gmail.com writes:
ORIGINAL1: I used to wear wooden shoes
On Aug 16, 7:33 pm, John Gordon gor...@panix.com wrote:
In ef0722a3-59ff-4fc3-87a9-e637ce9e2...@en1g2000vbb.googlegroups.com
rantingrick rantingr...@gmail.com writes:
wore means you have worn them in the past.
used to wear means you have worn them in the past AND don't intend
to do
On Aug 15, 2:31 am, Terry Reedy tjre...@udel.edu wrote:
On 8/15/2011 12:28 AM, Seebs wrote:
To repeat again: you are free to put in explicit dedent markers that
will let you re-indent code should all indents be removed.
As Terry has been trying to say for a while now, use the following
On Aug 15, 5:13 pm, Philip Semanchuk phi...@semanchuk.com wrote:
On Aug 15, 2011, at 5:52 PM, Gerrat Rickert wrote:
With surprising regularity, I see program postings (eg. on
StackOverflow) from inexperienced Python users accidentally
re-assigning built-in names.
For example, they'll
On Aug 15, 11:13 pm, alex23 wuwe...@gmail.com wrote:
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
I think I would be less skeptical about fluent interfaces if they were
written more like Unix shell script pipelines instead of using attribute
access notation:
On Aug 15, 7:48 pm, Gregory Ewing greg.ew...@canterbury.ac.nz wrote:
rantingrick wrote:
Used to and supposed to is the verbiage of children
and idiots.
So when we reach a certain age we're meant to abandon
short, concise and idomatic ways of speaking, and substitute
long words and phrases
Follow these simply rules to become an accepted member of the Python
community.
1. Bash rantingrick and Xah Lee every chance you get.
2. Bash people who bash rick or xah because their basing made rick's
or xah's words pass through
On Aug 14, 12:57 am, rantingrick rantingr...@gmail.com wrote:
9. Never use the word previously or the phrase in the past; just
dumb it down with used to.
I had forgot to mention one other usage of used to:
WRONG: I used to not like indention but know i am very used to it
RIGHT: Previously i
On Aug 14, 5:01 pm, Dave Angel da...@ieee.org wrote:
Interesting that when you complain about other's grammatical typos,
you're so careless with your own.
know - now
i - I
accustom - accustomed
the this - this
I'm inclined to ignore typos in emails except in the case where the
intent is
On Aug 14, 7:56 pm, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
Chris Angelico wrote:
I think you need to start a blog, Rick.
You'd be easier to ignore.
And yet, here you are, engaging him in conversation and feeding him the
attention he craves :(
Yes, Steven loves rule #
On Aug 12, 5:03 pm, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
Responding to Rick's standard {EDIT} posts
is like wrestling with a {EDIT}
[...]
Save yourself a lot of aggravation and kill-file him now.
Kindly allow Walter E. Kurtz to shine some light on this situation:
On Aug 12, 7:39 pm, Seebs usenet-nos...@seebs.net wrote:
Well, that's the thing.
In a case like:
if foo:
if bar:
blah
blah
I notice that *NOTHING* lines up with if bar:. And that affects me
about the way unmatched brackets do.
On Aug 12, 7:39 pm, Seebs usenet-nos...@seebs.net wrote:
I was overjoyed when I saw that Ruby would let me write 1_048_576.
I'll have to admit that Ruby has a few very interesting ideas, this
being one of them. We all know how impossible it can be to eyeball
parse a very long number like this.
On Aug 12, 7:39 pm, Seebs usenet-nos...@seebs.net wrote:
Consider the hypothetical array syntax:
a = [
1,
2
b = [
3,
4
This *bugs* me. It's perfectly legible, and if you define it that way, it's
unambiguous and
On Aug 12, 4:06 pm, Seebs usenet-nos...@seebs.net wrote:
On 2011-08-12, Chris Angelico ros...@gmail.com wrote:
Why is left-to-right inherently more logical than
multiplication-before-addition?
I'd say it's certainly more Pythonic in a vacuum.
Multiplication-before-addition, and all the
On Aug 12, 1:34 am, Seebs usenet-nos...@seebs.net wrote:
And part of this really is personal taste. I *LIKE* having a matching outdent
for everything. I like to look at code and see
blah
blah
blah
blah
blah
because
On Aug 12, 2:20 am, Chris Angelico ros...@gmail.com wrote:
Pike is very [snip]
Pike's purpose is [snip]
you go to Pike[snip]
I hope I make myself clear, Josephine?
The only thing that is clear to me is that you have a hidden agenda to
incorporate pike's functionality into Python -- and this
On Aug 12, 11:33 am, Seebs usenet-nos...@seebs.net wrote:
My brain has quirks. Some people call them defects, some don't, but it
really doesn't matter; there are things about which my brain is just plain
unreliable and I rely moderately heavily on extra visual cues to reduce
the frequency
On Aug 1, 3:19 am, Teemu Likonen tliko...@iki.fi wrote:
* 2011-07-30T10:57:29+10:00 * Steven D'Aprano wrote:
Teemu Likonen wrote:
Pathnames and the separator for pathname components should be
abstracted away, to a pathname object.
Been there, done that, floundered on the inability of
--
Overview of Problems:
--
* Too many methods exported.
* Poor choice of method names.
* Non public classes/methods exported!
* Duplicated functionality.
On Jul 26, 9:53 pm, Terry Reedy tjre...@udel.edu wrote:
On 7/26/2011 8:01 PM, rantingrick wrote:
Most new user think that printing an object to stdout is all they'll
ever need. However when you call print -- or sys.stdout.write(object)
-- you are only seeing a friendly version
I believe the current Python style guide is inconsistent. The author
again allowed his emotion to get in the way of logic. I will be
posting blocks of text from the PEP8 and commenting below them.
--
One of Guido's key insights is that
On Jul 27, 10:06 am, W. eWatson wolftra...@invalid.com wrote:
It's been many months since I played with Python, and have forgotten how
to bring up IDLE. If I simply click on a py file, I see what may be a
dos window appear and quickly disappear.
Double-clicking a [py|pyw] file in windows will
I believe the current Python style guide is inconsistent. The author
again allowed hie emotion to get in the way of logic. I will be
posting blocks of text from the PEP8 and commenting below them.
--
One of Guido's key insights is that
The Fundamental Five built-in functions
There are quite a few helpful built in functions provided to the
python programmer however in my mind five of them are the most
On Jul 25, 3:00 am, Ulrich Eckhardt ulrich.eckha...@dominolaser.com
wrote:
Chris Angelico wrote:
[snip]
You just gave the OP a fish, he provided a
valuable advise on fishing itself.
I always believed the best way to teach someone is not to give them a
direct answer. No. Instead i like to
On Jul 25, 2:08 pm, Peter Otten __pete...@web.de wrote:
Terry Reedy wrote:
On 7/25/2011 8:31 AM, Peter Otten wrote:
Saul Spatz wrote:
is it possible to set an onkey handler, that will pass on
valid keys?
With validatecommand you can have tkinter provide the string that is being
On Jul 24, 7:11 pm, Saul Spatz saul.sp...@gmail.com wrote:
Can one do something like this in tkinter?
(1) First of all what exactly do you wish return?
* an integer
* a float
* something else?
(2) Is this input part of a modal or non-modal interface?
For me, input validation should
On Jul 23, 1:53 am, Frank Millman fr...@chagford.com wrote:
--
The problem with that is that it will silently ignore any non-zero
digits after the point. Of course int(float(x)) does the same, which I
had overlooked.
On Jul 16, 3:35 am, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
I have a custom object that customises the usual maths functions and
operators, such as addition, multiplication, math.ceil etc.
Is there a way to also customise math.sqrt? I don't think there is, but I
may have
On Jul 23, 7:33 pm, goldtech goldt...@worldpost.com wrote:
n
[u'174']
Probably newbie question but not sure how suppress the brackets and
the 'u' ? I assume pyhon is telling me it's a unicode string in the n
variable.
Try type(n) and see what happens. Then report back. :)
--
On Jul 22, 12:05 am, Corey Richardson kb1...@aim.com wrote:
from archive import ZipFile, TarFile
zf = ZipFile(path, *args)
tf = TarFile(path, *args)
I have nothing to do this weekend, I might as well either write my own or
twist around the existing implementations in the hg repo.
My
On Jul 22, 12:45 am, Terry Reedy tjre...@udel.edu wrote:
On 7/22/2011 12:48 AM, rantingrick wrote:
On Jul 21, 11:13 pm, Corey Richardsonkb1...@aim.com wrote:
Hmm. Archives are more like directories than files. Windows, at least,
seems to partly treat zipfiles as more or less as such.
Yes
On Jul 22, 3:26 am, Lars Gustäbel l...@gustaebel.de wrote:
There is a reason why these two APIs are different. When I wrote tarfile
zipfile had already been existing for maybe 8 years and I didn't like its
interface very much. So, I came up with a different one for tarfile that in my
opinion
On Jul 22, 3:49 am, Lars Gustäbel l...@gustaebel.de wrote:
One could get the impression that you are leading a grass-roots movement
fighting a big faceless corporation. Instead, what you're dealing with is this
warm and friendly Python community you could as well be a part of if you are a
On Jul 22, 10:43 am, bruno.desthuilli...@gmail.com
bruno.desthuilli...@gmail.com wrote:
class names should start with an uppercase letter:
WRONG! Class identifiers should use the capwords convention
* class Foo
* class FooBar
* class FooBarBaz
On Jul 22, 7:42 am, Hrvoje Niksic hnik...@xemacs.org wrote:
Frank Millman fr...@chagford.com writes:
int(float(x)) does the job, and I am happy with that. I was just
asking if there were any alternatives.
int(float(s)) will corrupt integers larger than 2**53, should you ever
need them.
On Jul 22, 2:32 pm, rantingrick rantingr...@gmail.com wrote:
'{0:,.0f}'.format(2**53)
'9,007,199,254,740,992'
Would have been better to say
'{0:,}'.format(2**53)
'9,007,199,254,740,992'
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 22, 2:00 pm, John Gordon gor...@panix.com wrote:
Why did you say he (Bruno) was wrong?
I'll admit my yelling the word WRONG may have been interpreted as me
suggesting that bruno was completely wrong. Bruno is correct about all
class identifiers starting with a capital letter HOWEVER if
On Jul 21, 12:02 pm, Gary woody...@sky.com wrote:
--
total = ' '
os.chdir('/home/woodygar/Desktop/Docs')
for i in os.listdir('.'):
--
i was a bad local var choice here! i and x are typically
On Jul 21, 1:46 pm, Andrew Berg bahamutzero8...@gmail.com wrote:
[snip PGP noise!]
On 2011.07.21 01:32 PM, Thomas Jollans wrote:
So, the PEP says: do not align operators. End of story.
I'm pretty sure that colons, commas and equals signs are not operators.
'au contraire mon frere'.
Colons
I may have found the mother of all inconsitency warts when comparing
the zipfile and tarfile modules. Not only are the API's different, but
the entry and exits are differnet AND zipfile/tarfile do not behave
like proper file objects should.
import zipfile, tarfile
import os
I may have found the mother of all inconsitency warts when comparing
the zipfile and tarfile modules. Not only are the API's different, but
the entry and exits are differnet AND zipfile/tarfile do not behave
like proper file objects should.
import zipfile, tarfile
import os
I may have found the mother of all inconsitency warts when comparing
the zipfile and tarfile modules. Not only are the API's different, but
the entry and exits are differnet AND zipfile/tarfile do not behave
like proper file objects should.
import zipfile, tarfile
import os
1 - 100 of 706 matches
Mail list logo