Hello fellow programmers, scripters, hackers, and debutantes.
I have cross posted this thread to three groups that i believe need to
unite under the flag of unity for the benefit of all. Because when we
unite we not only help ourselves, we promote freedom. In the next few
paragraphs i will expose
On Jul 2, 6:38 pm, Chris Angelico wrote:
[... snip expositions...]
> C or C++ bindings will cover most languages.
>
> Chris Angelico
This is pretty much the entire argument, everything else is
exposition.
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 2, 6:38 pm, Chris Angelico wrote:
[...]
> It takes work to suit your API to a different language. Let's take GNU
> Aspell as an example; [...] Should the Aspell team offer bindings for every
> known language? In your post, you recommend supporting a minimum of
> three. Which three? Why?
No
Take Pidgin[1] as an example. Pidgin is a universal chat client. It's
a glue between the many chat clients that exist... It's a monkey patch
for chat multiplicity but you get the idea. However the Unity API
cannot be a monkey patch. It must be a mutual undertaking from the
beginning. Don't you peo
On Jul 2, 8:12 pm, Chris Angelico wrote:
> Any universal protocol will suffer either from complexity or
> narrowness - some suffer from both. If every API has to go through
> this Unity API, then either Unity will be as powerful and complex as C
> with all its libraries, or it'll overly restrict
> On Sat, Jul 2, 2011 at 7:37 PM, Dan Stromberg wrote:
>
> Adding a new API is seldom the way to decrease the number of API's.
> At least, not without -=very=- centralized control over which API's
> get used.
>
> I actually rather like it that no language has achieved the
> dominance today that C o
On Jul 2, 8:49 pm, Chris Angelico wrote:
> On Sun, Jul 3, 2011 at 11:43 AM, rantingrick wrote:
> > I mean what is the point of having two languages with the exact same
> > syntax?
>
> > Ruby: print 'blah'
> > Python: print 'blah'
>
> &g
On Jul 2, 10:14 pm, Chris Angelico wrote:
> I specced up "the perfect language" a while ago. It gave you a clean
> slate with no facilities but one: Define Operator. [...]
That was some great satire :) but the last thing we need is users with
that much power. Take the example of Ruby allowing you
On Jul 2, 10:57 pm, Gregory Ewing wrote:
> The place where this "Unity API" idea of yours falls down
> is that an API is only truly easy to use when it's designed
> to closely match the characteristics of the language it's
> being used from.
>
> For example, Python has a very powerful feature that
On Jul 2, 11:00 pm, Gregory Ewing wrote:
> rantingrick wrote:
> > Ruby: for x in blah: blah_blah_blah
> > Python: for x in blah: blah_blah_blah
>
> Here you're making the mistake of thinking that surface syntax
> is all that matters. Although the 'for' st
Hello Folks,
As many of you already know yours truly has posted improvements to the
tkSimpleDialog many moons back HOWEVER i was looking over the code a
few moments ago and realized even more improvements were needed.
These improvements mainly concern naming conventions, comments, and
docstrings
Tkinter has a major flaw and this flaw has been with us for many many
years. What is the flaw? Well the title says it all folks... IMPLICIT
INITIALIZATION IS EVIL. Still confused, well let me explain.
Unlike most GUI libraries the Tkinter developers thought is would
"just wonderful" if the root GU
Hello Folks!
In my quest to uncover the many asininities contained within the
tkSimpleDialog.py module i found myself contemplating some the very
fundamental aspects of the Python language proper. And this is aspect
be... "Pythonic notation".
But before i introduce you to my latest discovery of
Sorry folks. I found a few bugs in that pasted code of the new and
improved tkSimpleDialog. I believe most here could debug it however
just in case any newbies are watching i want the code to execute
without error.
## START CODE ##
import Tkinter as tk
MESSAGE = """
You are following bad design
On Jul 3, 6:41 pm, amir chaouki wrote:
> i have written code on linux for parsing text files and it works great
> but when i try to run it on windows it goes crazy, do you have any
> idea???
psst: you should show us the code first. :)
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 4, 3:33 am, Gregory Ewing wrote:
> IMO the real problem here is the existence of a privileged
> "root" window at all. No GUI platform I know of has any
> such concept (except for a "desktop" window that represents
> the whole screen, which is not the same thing). All top-level
> windows sh
On Jul 4, 3:44 am, Chris Angelico wrote:
> I don't know Tkinter, but from the look of the example code, he's
> creating a Label that's not attached to a window, and then packing it
> into nothing. The toolkit kindly creates him a window. Is that the
> "root GUI window" that he means? A basic top-
On Jul 4, 10:40 am, Chris Angelico wrote:
> Uhh, sorry. No. There are plenty of good reasons for one application
> to make multiple top-level windows, and if I ever find myself using a
> toolkit that makes this difficult, I'll either be hacking the toolkit
> or using a different one. I've been bu
oops. should have used symmetric_difference!
>>> a.symmetric_difference(b)
set(['_w', '_setup', 'report_callback_exception', '_do',
'__getattr__', 'loadtk', '_loadtk', 'readprofile'])
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 4, 12:06 am, alex23 wrote:
> rantingrick wrote:
> > But why must we have
> > completely different languages just for that those two approaches?
>
> Because monocultures die.
That's an interesting statement Alex (even though you parrot it
constantly). So what
On Jul 4, 11:01 am, Chris Angelico wrote:
> On Tue, Jul 5, 2011 at 1:46 AM, rantingrick wrote:
> > On Jul 4, 10:40 am, Chris Angelico wrote:
>
> >> Uhh, sorry. No. There are plenty of good reasons for one application
> >> to make multiple top-level windows, and
On Jul 4, 12:41 pm, Chris Angelico wrote:
> For another example, look at where web browsers are going. By your
> description, one instance of a browser should work with precisely one
> "document" (which in this case would be a web page). That's how
> browsers were in the early days, but by the ea
On Jul 4, 1:11 pm, Tim Johnson wrote:
> Using Python 2.6 on ubuntu 10.04.
> inspect module :
> I want to 'inspect' a module and get a list of all
> functions, classes and global variables in that module.
>
> ## A module has been imported, and we call `getmembers'
> members = inspect.getmembers(mod
On Jul 4, 3:30 pm, Tim Johnson wrote:
>
> Thanks for the reply: *but*
> dir() will also show globals from other modules imported
> by the target module. So I would need a way to distinguish between
> those imported and those defined in
Okay, then do some processing on the source. You can
On Jul 4, 2:36 am, Gregory Ewing wrote:
> We have different languages because different people have different
> ideas about what a language should be like. Ruby people like user
> defined control structures; Python people regard user defined
> control structures as an anti-feature. It's fundament
On Jul 5, 11:04 am, Corey Richardson wrote:
> How is giving the sort method a function by which to determine the relative
> value of objects a control structure? Do you know what a control structure is?
> It's something that you use to modify control flow:
>
> if foo <= bar:
> foo += 1
>
On Jul 5, 10:17 am, Chris Angelico wrote:
> It's actually quite easy to implement this, even if you _are_ forced
> to have one primary window. You just have an invisible primary whose
> sole purpose is to "be the application", and then everything else is
> secondary windows. Kinda defeats the pur
On Jul 5, 11:00 am, Web Dreamer wrote:
> What he means is that On Mac, if you close "all" windows, the application is
> still running.
Then that is NOT closing windows that is only ICONIFIYING/HIDING them.
Let's use the correct lingo people!
--
http://mail.python.org/mailman/listinfo/python-li
On Jul 5, 6:14 am, Gregory Ewing wrote:
> rantingrick wrote:
> > Most applications consist of one main window
> > (a Tkinter.Tk instance).
>
> You've obviously never used a Macintosh. On the Mac, it's
> perfectly normal for an application to open multiple
> do
On Jul 5, 6:20 pm, Chris Angelico wrote:
> On Wed, Jul 6, 2011 at 8:42 AM, rantingrick wrote:
> [...]
> > On Jul 5, 11:00 am, Web Dreamer wrote:
> >> What he means is that On Mac, if you close "all" windows, the application
> >> is
> >> stil
On Jul 5, 6:54 pm, Chris Angelico wrote:
> To do what for me? Close windows? Reclaim memory? Terminate
> applications? I don't understand your bogglement.
ClaimA: I made claim that Tkinter's window hierarchy is not only
normal, but justified in modern GUI programming.
ClaimB: You made a claim (
On Jul 5, 7:34 pm, Chris Angelico wrote:
> Actually, everything you do requires the underlying window manager,
> otherwise you're just painting your own pixels on the screen. And I
> never said that this model was possible in some and not others.
> (Although it's a bit harder with Windows; there'
On Jul 4, 6:24 pm, Steven D'Aprano wrote:
> rantingrick wrote:
> Some people want to make Python more dynamic. Some want it to be less
> dynamic. Some care about integrating it with Java or .Net, some don't care
> about either. Some are interested in clever optimization
On Jul 5, 10:26 am, Steven D'Aprano wrote:
> This is not strictly Python, although it is peripherally relevant.
>
> Some month or three ago, I read an article or blog post about API design,
> specifically the wrong-headedness of insisting that callers manually
> initialise instances using a separa
On Jul 5, 9:44 pm, Chris Angelico wrote:
> On Wed, Jul 6, 2011 at 11:53 AM, rantingrick wrote:
> > So you would start drivers education class with road construction? Or
> > the history of the internal combustion engine? Who cares about
> > actually *driving* the car.
>
&
On Jul 6, 6:44 am, Steven D'Aprano wrote:
> A control structure is a structure which controls the program flow. Control
> structures include:
>
> * jumps (goto, gosub, comefrom, exceptions, break, continue)
>
> * loops (for, while, repeat...until)
>
> * conditional branches (if, case/switch)
---
On Jul 6, 1:12 am, Gregory Ewing wrote:
> rantingrick wrote:
> >>What he means is that On Mac, if you close "all" windows, the application is
> >>still running.
>
> > Then that is NOT closing windows that is only ICONIFIYING/HIDING them.
>
> No, the w
On Jul 6, 9:32 am, Steven D'Aprano wrote:
> rantingrick wrote:
> > If you design a GRAPHICAL user interface, then once the GRAPHICAL part
> > is removed (window), why do need the main code to stick around?
>
> Open your mind to ideas that go beyond your simple window-cen
On Jul 6, 9:55 am, Steven D'Aprano wrote:
> rantingrick wrote:
> > ---
> > THIS CODE RESULTS IN A CONTROL STRUCTURE!
>
> > --> lst.sort(lambda x,y: cmp(x[1], y[1]))
>
> No it doesn't.
>
> How does it chan
On Jul 6, 11:11 am, Steven D'Aprano wrote:
> The Dead Window Sketch
> ==
>
> [snip]
##
The Roman Stawman Sketch
##
[cmp.lang.python]:
(The trolls are gathered and a righteous man speaks.)
GRACCHUS: For your guidance TrollCae
On Jul 7, 12:34 am, Gregory Ewing wrote:
> rantingrick wrote:
> > Yes but what benefit does that gain over say, Tkinter's design
> > (because that has been your argument).
>
> Like I said, it's a tangential issue.
Agreed.
> The important thing is that it'
On Jul 7, 8:25 pm, Steven D'Aprano wrote:
> rantingrick wrote:
> > On Jul 7, 12:34 am, Gregory Ewing wrote:
> >> The important thing is that it's okay for an app to stay
> >> alive until its *last* top level window is closed.
>
> I partially disagree wi
On Jul 4, 3:43 am, Gregory Ewing wrote:
> rantingrick wrote:
> > what concerns me is the fact that virtual methods in derived
> > classes just blend in to the crowd.
> > I think we really need some
> > sort of visual cue in the form of forced syntactical notation (just
On Jul 10, 12:41 pm, Tim Johnson wrote:
> It possible for a function to print it's own docstring?
def f():
"""docstring"""
print "docstring"
any questions?
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 10, 7:31 pm, Michael Hrivnak wrote:
> It sounds to me like you need a better IDE, better documentation,
> and/or better code to work on and use.
Yes the last two points are relevant here. However whilst IDE choice
belongs to the user, documentation and code are in the hands of the
develope
On Jul 10, 11:45 pm, Michael Hrivnak wrote:
> I can't believe you're saying that you will create a sub-class without
> taking the time to understand the base class.
I'm NOT saying that so stop putting words in my mouth!
> Seriously? That right
> there is why you are seeing method overrides that
On Jul 11, 11:33 am, rusi wrote:
> A gui-builder reduces the semantic gap by showing a widget when the
> programmer things 'widget.'
> Banging out hundreds of lines in vi/emacs for the same purpose does a
> measurably poorer job.
It is very rare to need to "bang out" hundreds of lines of code to
On Jul 11, 1:03 pm, Chris Angelico wrote:
>
> The one time where point and click is majorly superior to scripted
> design is with pixel positioning of widgets. You can drag things
> around until you're artistically happy with them, rather than have to
> fiddle with the numbers in code.
This is tr
On Jul 11, 1:28 pm, Ivan Kljaic wrote:
> To summarize it. It would be very helpfull for python to spread if
> there qould be one single good rad gui builder similar to vs or
> netbeAns but for python.
Well don't hold your breath friend because i have been ranting for
years about the sad state of
On Jul 11, 9:41 am, Chris Angelico wrote:
> On Mon, Jul 11, 2011 at 11:42 PM, rantingrick wrote:
> > This mandate must be handed down from the gods who reside on "Mount
> > REFUSE-E-OUS to RECOGNIZE-E-OUS a major PROBLEM-O-MOUS"
>
> I assume you're trying
On Jul 12, 1:43 pm, CM wrote:
> > > One reason there hasn't been much demand for a GUI builder is that, in
> > > many cases, it's just as simpler or simpler to code a GUI by hand.
>
> I use a GUI builder because I'd rather click less than
> type more. I just tried that in Boa Constructor; with ~10
On Jun 30, 11:29 pm, Steven D'Aprano wrote:
> The dir() function is designed for interactive use, inspecting objects for
> the names of attributes and methods.
>
> Here is an enhanced version that allows you to pass a glob to filter the
> names you see:
meh,
I have always believed in keeping my
On Jul 1, 12:20 pm, Tim Chase wrote:
> If it came in as an effortless (i.e. O(1) where I do it once and
> never again; not an O(n) where n=the number of times I invoke
> Python) default replacement for dir(), I'd reach for it a lot
> more readily. I seem to recall there's some environment-var or
On Jul 13, 10:14 am, rusi wrote:
> Well written, funny, educative. Thanks
> But whats 'the modeling and sym guy' reference?
I believe it's "esoteric".
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 13, 4:40 pm, Chris Angelico wrote:
> Having not known the original, I can't properly appreciate the parody,
It's only a click away Chris... here let me youtube that for you...
http://www.youtube.com/watch?v=4AKbUm8GrbM
http://www.youtube.com/watch?v=SHhrZgojY1Q
http://www.youtube.com/
# Multiplicity and Asininity in Tkinter Event API! #
The problems with Tkinter events are two fold:
Probl
Hello Folks,
Lately i have been musing over the ideas of method tagging.
Specifically i am referring to method identifiers. As most of you know
i had proposed to add "syntactical markers" to the language to deal
with the ambiguities that arise whist eyeball parsing sub classed
methods that clobbe
On Jul 14, 8:21 pm, Inside wrote:
> As telling in the subject,because "list" and "tuple" aren't functions,they
> are types.Is that right?
You wanna see some warts in the docs. Okay, try to use the search box
to find list, dict, or tuple and see what happens...
http://docs.python.org/
Search: [
On Jul 15, 1:17 am, Chris Angelico wrote:
> On Fri, Jul 15, 2011 at 8:34 AM, rantingrick wrote:
> >
> >
> >
> >
> >
> >
>
> > That's it. Go ahead, try to prove me wrong!
>
> Does MouseClick mean Mouse Button Down, or does
On Jul 15, 2:13 am, Chris Angelico wrote:
> On Fri, Jul 15, 2011 at 9:02 AM, rantingrick wrote:
> > Too many folks
> > are refusing to document properly and so i will take this time to
> > hammer out a spec.
>
> The tighter you squeeze your fist, Lord Rick, the more s
On Jul 15, 6:16 pm, Chris Angelico wrote:
> On Sat, Jul 16, 2011 at 4:56 AM, rantingrick wrote:
> > Hmm, that's strange considering that code MUST be formatted in certain
> > ways or you get a syntax error (indention, colons, parenthesis, etc,
> > etc). I don't hea
--
Summary
--
As we all know python allows us to use either tabs or spaces but NEVER
both in the same source file. And as we also know the python style
guide says we should use four spaces and refrain
On Jul 16, 5:34 pm, Fabio Zadrozny wrote:
> I also like the idea of override annotations and I've created a blog
> post
> at:http://pydev.blogspot.com/2011/06/overrideimplements-templates-on-pyd...
> to explain how I do use it (and in a way that I think should be
> standard in Python the same wa
On Jul 16, 6:03 pm, Andrew Berg wrote:
> Shouldn't that be s = s.replace('--->', '\t') ?
Now you see what this four space "brain washing" has done to us!
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 17, 2:32 am, Ian Kelly wrote:
> This. I used to think that tabs were better, for pretty much the
> reasons Rick outlined, but I've had enough problems with editors
> munging my tabs that I eventually found it simpler in practice to just
> go with the flow and use spaces.
Solution: STOP U
On Jul 17, 2:35 am, Thorsten Kampe wrote:
> * rantingrick (Sat, 16 Jul 2011 09:51:02 -0700 (PDT))
>
> > 3) Tabs create freedom in the form of user controlled indention.
>
> > Indention width should be a choice of the reader NOT the author. We
> > should never "co
On Jul 17, 5:42 am, Thorsten Kampe wrote:
> When I'm (consistently, of course) indenting code, I'm aligning it. When
> I'm aligning code, I do this by indenting it, see for instance...
>
> firstvariable = 11
> variable = 111
>
> firstvariable = 22
> variable = 222
>
> The second "=" and
On Jul 17, 4:49 am, "Anders J. Munch" <2...@jmunch.dk> wrote:
> Originally, tabs were a navigation device: When you press the tab key, you
> skip
> ahead to the next tab column. The notion that whitespace characters are
> inserted into the text would have been very alien to someone using text
>
On Jul 17, 6:11 am, Tim Chase wrote:
> On 07/16/2011 10:10 PM, Steven D'Aprano wrote:
>
> > But I've never come across an email client that messes with
> > attachments. Just send your code as an attached .py file and
> > it's all good.
>
> However I'm on a couple mailing lists (e.g. lurking on Ope
On Jul 17, 12:11 pm, Chris Angelico wrote:
> On Mon, Jul 18, 2011 at 2:53 AM, rantingrick wrote:
> > [a whole lot of guff]
>
> Rick, you need to:
>
> 1) Grab the Python source code
> 2) Make your own version of Python that works the way you want it
> 3) Call it som
On Jul 17, 1:20 pm, Thorsten Kampe wrote:
> > The past is bickering over selfish personal freedoms, the future of is
> > unity.
>
> And a tab is *exactly* four spaces. Not three. Not five. Not eight. For
> you, for me, and for the rest of the world. Amen!
Not *exactly*.
A tab is just a control
On Jul 17, 1:22 pm, Tim Chase wrote:
> > Solution: STOP USING BROKEN TOOLS!!!
>
> Unbroken tools that do anything worthwhile are usually
> complicated tools.
>
> Just pointing that out in case you missed the irony...
You make a good point, albeit a very well know point. It's the same
kind of poi
On Jul 17, 1:48 pm, Ian Kelly wrote:
> Let me get this straight. You want us to use tabs so that individuals
> can set their tab width to however many spaces they want, but then you
> want everybody to set their tab widths to 4 spaces. You're
> contradicting yourself here.
In my mind people ar
On Jul 17, 1:54 pm, Ian Kelly wrote:
> On Sun, Jul 17, 2011 at 10:29 AM, rantingrick wrote:
> > I hate vertical white-space. I follow Python style guide suggestions,
> > and then some! I hate when people insert spaces into code blocks and
> > function/method bodies. If you
On Jul 17, 2:34 pm, Thorsten Kampe wrote:
> Indentation alignment will (because you're using only spaces). Otherwise
> it doesn't align (it can't), simply because of the "variable-width".
>
> For instance (in a variable-width font):
>
> if a == b:
> var123 = 22
> varxyz456 = 333
>
On Jul 17, 2:47 am, Xah Lee wrote:
> 2011-07-16
>
> folks, this one will be interesting one.
>
> the problem is to write a script that can check a dir of text files
> (and all subdirs) and reports if a file has any mismatched matching
> brackets.
>
>[...]
>
> • You script must be standalone. Must
On Jul 19, 9:12 pm, sturlamolden wrote:
> What is wrong with them:
>
> 1. Designed for other languages, particularly C++, tcl and Java.
This fact bugs me but no one is willing to put forth an effort to make
things happen. So we are stuck with what we have now.
> 3. Unpythonic memory management:
On Jul 19, 9:44 pm, Kevin Walzer wrote:
> > 2. Bloatware. Qt and wxWidgets are C++ application frameworks. (Python
> > has a standard library!)
>
> Again, so? This isn't applicable to Tk, by the way. It's a GUI toolkit
> specifically designed for scripting languages.
Tk is SPECIFICALLY designed
On Jul 20, 9:27 am, sturlamolden wrote:
> On 20 Jul, 16:17, Mel wrote:
>
> > OTOH, if you intend to re-use the Dialog object, it's not a memory leak.
>
> It cannot be reused if you don't have any references pointing to it.
> Sure it is nice to have dialogs that can be hidden and re-displayed,
> b
On Jul 19, 11:28 pm, Steven D'Aprano wrote:
>
> Have you tried Tkinter version 8.0 or better, which offers a native look and
> feel?
Steven, you have no buisness offering advice on Tkinter since you
yourself have proclaimed that YOU NEVER used the module and never
will. Stick to what you know ple
RE: *Ben Finney changes thread subject*
Please everyone, do not change the subject of someone's thread because
it's considered rude. Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
RE: *Tim Chase changes topic and talks smack*
On Jul 20, 8:38 pm, Tim Chase wrote:
> On 07/20/2011 08:17 PM, rantingrick wrote:
>
> > RE: *Ben Finney changes thread subject*
>
> > Please everyone, do not change the subject of someone's thread because
> >
On Jul 21, 1:46 pm, Andrew Berg 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 in a dictionary are as
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
>>> os.path.ex
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
>>> os.path.ex
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
>>> os.path.ex
On Jul 21, 11:13 pm, Corey Richardson wrote:
> Excerpts from rantingrick's message of Thu Jul 21 23:46:05 -0400 2011:
>
> > 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 di
On Jul 22, 12:05 am, Corey Richardson 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.
On Jul 22, 12:45 am, Terry Reedy wrote:
> On 7/22/2011 12:48 AM, rantingrick wrote:
> > On Jul 21, 11:13 pm, Corey Richardson wrote:
> Hmm. Archives are more like directories than files. Windows, at least,
> seems to partly treat zipfiles as more or less as such.
Yes but a zi
On Jul 22, 3:26 am, Lars Gustäbel 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 was more gener
On Jul 22, 3:49 am, Lars Gustäbel 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
> reasonable guy an
On Jul 22, 10:43 am, "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
--
PEP8.Naming_Conventi
On Jul 22, 7:42 am, Hrvoje Niksic wrote:
> Frank Millman 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. int(decimal.Decimal(s)) works w
On Jul 22, 2:32 pm, rantingrick 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 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 he just
stops
On Jul 21, 12:02 pm, Gary 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 reserved to
represe
On Jul 23, 1:53 am, Frank Millman 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 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 missed something.
Hmm, this ques
On Jul 23, 7:33 pm, goldtech 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. :)
--
http://mail.python.org/ma
On Jul 24, 7:11 pm, Saul Spatz 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 happen in *real* time an
1 - 100 of 708 matches
Mail list logo