On Thursday, July 17, 2014 4:59:11 AM UTC-5, Nicholas Cannon wrote:
> Ok I would say I am almost a intermediate python
> programer. I have made 2 programs(with GUI). And basically
> they are quite boring(a text editor and calculator). I
> love programming but i am lost of ideas i actually suck at
>
On Thursday, July 17, 2014 12:48:38 AM UTC-5, alex23 wrote:
> PHP regularly breaks compatibility between _minor_ version
> releases: [...] more so with major releases: [...] yet I
> never see anywhere near as much angst and agony as Python
> 3.x has caused.
Because you *IGNORE* the fact that peopl
On Thursday, July 17, 2014 5:12:23 AM UTC-5, Fabien wrote:
> For non-informatic students [...] I don't think that's true.
> Less general languages like Matlab appear much easier to
> me: unified doc, unified IDE, unified debugger
I'll agree that the lack of a "quality" IDE in Python is a
point of
> On Fri, Jul 18, 2014 at 3:36 AM, Rick Johnson
> This is a truly amazing demonstration. You have outdone
> Gaelmaen for comprehensibly incorrect use of English.
Of all my impassioned pleas, astute logical reasoning, and
empathetic motivational speeches, of all of that "gold",
On Thursday, July 17, 2014 12:20:13 PM UTC-5, Chris Angelico wrote:
> By the way, one specific point about RR's advice: A
> colorizer should *not* be written using regexps. It'd make
> for an absolute nightmare of impossible-to-debug regexp
> strings
Just because *YOU* harbor irrational fears of r
On Thursday, July 17, 2014 1:44:20 PM UTC-5, Marko Rauhamaa wrote:
> Rick Johnson :
> > Sure, IDLE is not *useless*, however, it is in fact
> > woefully inadequate and should be embarrassing to the
> > whole community, both in it's buggy-ness and it's poorly
>
On Thursday, July 17, 2014 9:03:40 PM UTC-5, Chris Angelico wrote:
> [colorizers] might well be able to *utilize* regexps [...]
> but very few modern programming languages can be fully and
> correctly defined within the limits of regexp syntax.
We're not talking about "defining" or "interpreting"
On Thursday, July 17, 2014 9:15:15 PM UTC-5, Chris Angelico wrote:
> For myself, though, I completely do not use the editor half of [IDLE]; but
> it's spectacularly useful (with limitations) as my primary interactive
> interpreter.
Yes Chris, i also think that the IDLE shell is "spectacular"
when
On Thursday, July 17, 2014 10:23:50 PM UTC-5, Chris Angelico wrote:
> And be sure *not* to colorize built-ins (but *do* colorize
> keywords) in contexts where the tokens are actually
> identifiers, like "x.open = 1".
Just check for word boundaries on all your keywords and
built-ins and you're *DO
On Friday, July 18, 2014 1:20:10 PM UTC-5, Steven D'Aprano wrote:
> PyDev, Eric, Komodo, PyCharm, WingIDE, SPE, Ninja-IDE,
> Geany, IEP, Spyder, Boa Constructor, PyScripter, NetBeans,
> Emacs, KDevelop, BlackAdder, ...
And tell me Steven, how many of those "quality" IDEs that
you listed actually *
On Friday, July 18, 2014 8:21:36 PM UTC-5, Terry Reedy wrote:
> What ancient version, or oddball system are you using? For
> me, Win 7, both 2.7.8 and 3.4.1 "CONTROL+LEFT_ARROW" and
> the cursor is before the 'a' of [>>> abc]. The HOME key
> goes to the same place first, and they before >>> on the
[A missed point from my last reply...]
Terry Reedy said:
> I believe there is a proposal to be able to clear the
> shell window. We just need to add "Clear and restart
> shell".
A command that allows clearing the *entire* shell display
and also resets the global and local symbol tables,
*WITHOUT
[A missed point from my last reply...]
Terry Reedy said:
> I believe there is a proposal to be able to clear the
> shell window. We just need to add "Clear and restart
> shell".
A command that allows a user to clear the *ENTIRE* "shell
IO" and *ALSO* resets the global and local symbol tables
*WI
On Saturday, July 19, 2014 3:45:07 PM UTC-5, Terry Reedy wrote:
> On 7/19/2014 12:29 PM, Rick Johnson wrote:
> [2.7.2 and 3.2.2] are ancient versions from years ago that
> no one should be running Idle on now.
I have just downloaded and installed versions 2.7.8 and
3.4.1, and i am happy
BUG 1: FileDialog Duplicity:
If you open the IDLE application (either utilizing the
"shell window" or "editor window") and then go to the "File"
menu and choose the "Open" co
On Sunday, July 20, 2014 4:40:59 PM UTC-5, Irmen de Jong wrote:
> On 20-7-2014 23:14, Rick Johnson wrote:
> > And since IDLE is not a "tabbed editor", only *1*
> > document is going to be displayed at a time.
> False. Idle opens any number of documents at the same ti
On Sunday, July 20, 2014 4:52:36 PM UTC-5, Terry Reedy wrote:
> On 7/19/2014 9:31 PM, Rick Johnson wrote:
> > On Saturday, July 19, 2014 3:45:07 PM UTC-5, Terry Reedy wrote:
> * The third paragraph below explains that Shell's prompt
> is a statement prompt rather than li
On Sunday, July 20, 2014 8:02:11 PM UTC-5, Chris Angelico wrote:
> File dialogs can be modal or modeless. [...] and there are
> good reasons for both operation styles [...] Are you
> seriously unaware of standard GUI widget functionality?
Chris i get so tired of your trolling, you cannot just post
On Saturday, August 2, 2014 5:53:12 PM UTC-5, Nicholas Cannon wrote:
> So i have a basic calculator program and i
> have a label that i want to go across the top to show the
> numbers and stuff like on a normal calculator. The only
> way i can make the buttons look neat and then when i keep
> press
Hello Fellow Pythonistas,
I am very glad to be back after an unfortunate incident caused my
Google account to be deleted. Unfortunately for those of you that have
been following along and supporting my crusade to bring fairness and
humility to the python community, my old posts under "rantingrick"
On Nov 26, 11:28 am, rusi wrote:
> On Nov 26, 6:40 pm, kj wrote:
> The only thing I disagree about is that GvR is 'top' enough to handle
> this.
For a concrete example of how uninterested Mr. Van Rossum has become,
take a look at the gawd awful state of Tkinter and especially IDLE.
Whist I appla
On Nov 20, 6:46 pm, Travis Parks wrote:
> Hello:
>
> I am currently working on designing a new programming language. It is
> a compiled language, but I still want to use Python as a reference.
> Python has a lot of similarities to my language, such as indentation
> for code blocks,
I hope you mea
On Nov 26, 1:34 pm, Chris Angelico wrote:
> On Sun, Nov 27, 2011 at 5:53 AM, Rick Johnson
>
> wrote:
> > I hope you meant to say "*forced* indention for code blocks"! "Forced"
> > being the key word here. What about tabs over spaces, have you decided
&
On Dec 5, 11:10 pm, Chris Angelico wrote:
> On Tue, Dec 6, 2011 at 3:36 PM, Xah Lee wrote:
> > i don't like python, and i prefer emacs lisp. The primary reason is
> > that python is not functional, especially with python 3. The python
> > community is full of fanatics with their drivels. In that
On Dec 6, 3:27 am, Nobody wrote:
> On Mon, 05 Dec 2011 16:23:55 +, Grant Edwards wrote:
> >> Emitting "\b \b" is one very common way to do a destructive backspace.
> >> Inelegant? Perhaps, but a common inelegance.
>
> > That's pretty much the only way I've seen it done for the past 25
> > year
t is it that Xah is not a productive part of this community?
Hmm? Do we just take the easy way out an blame Xah? Or do we need to
observe our "collective" attitudes to perceived "outsiders"?
I believe this community has a cancer. A cancer that is rotting us
from the inside. A ca
On Dec 6, 9:52 pm, alex23 wrote:
> (snip rambling nonsense)
Alex, i hope you are being theatrical with all this. If not, i fear
you may be putting too much stress on your heart. Please calm down.
> The months in which you don't post are an absolute goddamn
> _delight_
I am working on Python4000
On Dec 14, 12:47 pm, Muddy Coder wrote:
> Hi Folks,
>
> I am trying to write letters on a photo that is opened in a canvas. So
> I think I must need a widget to contain the letters I will type in. I
> tried to use a Label, it worked. But, a Label covered part of the
> photo underneath, so I can't
On Dec 14, 8:17 pm, Muddy Coder wrote:
> Hi Folks,
>
> Sorry for the unclear question in last post. Well, I am using Tkinter
> to do GUI, and I just don't know what kind of widget can let me do
> annotation on an image being displayed. An example is the Paint of
> Windows: a dotted line box appear
On Dec 17, 10:52 pm, buck wrote:
> [...]
> As for the separator, let's examine the available ascii punctuation.
> Excluding valid variable characters, whitespace, and operators, we have:
>
> ! -- ok.
No, there are better uses for that char.
> " -- can't use this. Would look like a string.
> # --
On Dec 17, 11:33 pm, Evan Driscoll wrote:
> On 12/17/2011 22:52, buck wrote:> Try these on for size.
>
> > head, @tuple tail = sequence
> > def foo(@list args, @dict kwargs): pass
> > foo(@args, @kwargs)
>
> > For backward compatibility, we could say that the unary * is identical to
On Dec 18, 8:35 am, Eelco wrote:
> On Dec 18, 6:33 am, Evan Driscoll wrote:
> Good point; technically the askeriskes could be kept for backwards
> compatibility, but that would break 'there should only be one way to
> do it'.
I believe it's high time for the upper society of this community to
r
On Dec 18, 7:26 pm, Steven D'Aprano wrote:
> Not everybody uses editors more advanced than Notepad.
And they have no excuse for NOT using a better one. Well, except for a
"foolish consistency" that is!
> Even those who do
> may not have an editor that understands Python keywords, or has an
> obso
On Dec 19, 11:13 am, Tycho Andersen wrote:
> Hi all,
>
> A couple months ago I found a bug in a corner of the curses library
> (http://bugs.python.org/issue13051) and filed it. Unfortunately, there
> was nobody listed to cc on the noisy list, so it probably got lost in
> the shuffle. (There is eve
I just read an article[1] reporting that Apple has won a court case
against Andoid (and others) over a patent infringement. Before i was
able to see what all the hub-bub was about my mind started to wonder
what "advanced technology" Google has stolen from Apple.
To my great UNSURPRISE the so-calle
On Dec 20, 5:09 am, Gabor Urban wrote:
> Hi,
>
> I am quite newbie with Tkinter and I could not find the way to set the
> size of the application.
Probably due to this haphazard coding style; why would you name an
object "Application" that is an instance of Tkinter.Frame? That is
just going to co
On Dec 20, 2:14 am, Stefan Behnel wrote:
> For teaching, I think it's better to come around with something simpler
> than a full-blown IDE, so that you can show off interactive development,
> help() and other introspection features. IMHO much better than hiding all
> that behind an IDE,
That is
On Dec 20, 9:20 am, Eric Brunel
wrote:
> Where did you find an example code looking like this? This looks like
> veery old conventions for Tkinter programsŠ
>[...]
> And you should avoid creating only an instance of Frame. This actually
> creates a window, but it's a side-effect.
Two major p
On Dec 20, 12:31 pm, kimma wrote:
> Hi there,
>
> I am about to learn python with "how to think like a computer
> scientist". This book is just available for python 2.4. Does it matter
> for programming?
>
> Greetz
Kimma, don't listen to either of these guys. Anything before Python
3.0 is now obs
On Dec 20, 8:13 pm, Ashton Fagg wrote:
> On 21 December 2011 10:31, Rick Johnson wrote:
> I got the impression the OP was learning programming in general (i.e.
> from scratch) and not merely "learning Python". If this is the case it
> shouldn't matter if they're
On Dec 21, 6:59 am, Muddy Coder wrote:
> Hi Folks,
>
> I was driven nuts by this thing: widgets lost their attributes, then I
> can't configure them. Please take a look at the codes below:
The problem is here...
> labels = []
> for i in range(len(astr)):
> lbl = Label(win, text=
On Dec 24, 11:09 am, Arnaud Delobelle wrote:
> sum(map(str.__ne__, str1, str2))
Mirror, mirror, on the wall. Who's the cleanest of them all?
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 24, 6:24 pm, alex23 wrote:
> That you're a condescending douchebag with nothing of value to
> contribute?
>
> Crystal.
Take it from me Eelco. Once Alex drops into your thread and starts
name calling, it's over my friend.
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 22, 2:21 am, Spencer Pearson wrote:
> I'm writing a geometry package, with Points and Lines and Circles and
> so on, and eventually I want to be able to draw these things on the
> screen.
...which is the main reason for creating a geometry package in the
first place!. I mean, imaginary poi
On Dec 25, 9:33 am, Yigit Turgut wrote:
> Hi all,
>
> I have a text file as following;
>
> 0.200047 0.00
> 0.200053 0.16
> 0.200059 0.00
> 0.200065 0.08
> 0.200072 0.00
> 0.200078 0.16
>
> And I am trying to plot it with ;
>
> filen
On Dec 19, 9:51 pm, Raymond Hettinger
wrote:
> Do you use IDLE when teaching Python?
> If not, what is the tool of choice?
I believe IDLE has the potential to be a very useful teaching tool and
even in it's current abysmal state, i find it to be quite useful.
> Students may not be experienced wi
On Dec 25, 9:27 pm, Chris Angelico wrote:
> On Mon, Dec 26, 2011 at 4:44 AM, Rick Johnson
> > [...]
> Conversely, why write an IDE into IDLE when perfectly-good IDEs
> already exist? I don't use IDLE for development per se; it's for
> interactive Python execution, but
On Dec 26, 10:11 am, Nathan Rice
wrote:
> On Mon, Dec 26, 2011 at 9:52 AM, Rick Johnson
>
>
>
>
>
>
>
>
>
> wrote:
> > On Dec 25, 9:27 pm, Chris Angelico wrote:
> >> On Mon, Dec 26, 2011 at 4:44 AM, Rick Johnson
> >> > [...]
> >
On Dec 26, 4:23 pm, Charles Hixson wrote:
> This doesn't cause a crash, but rather incorrect results.
>
> self.wordList = ["The", "quick", "brown", "fox", "carefully",
> "jumps", "over", "the", "lazy", "dog", "as", "it",
> "stealthily", "wends", "its", "way"
On Dec 27, 12:14 am, Carl Smith wrote:
> Do people seriously use IDLE? I thought it was just there for
> scratchers, like turtle.
I know for a fact that many folks use IDLE, even some rather "well
known" folks around here. The fact is, more people use IDLE than admit
to using IDLE. Of course, out
--
Note: superfluous indention removed for clarity!
--
On Dec 27, 8:53 am, Dennis Lee Bieber wrote:
> You can get by without the backslash in this situation too, by using
> triple quoting:
I would not do that because:
1. Because Python already has TWO string literal delimiters (' and ")
2. Becau
On Dec 27, 11:50 am, Lie Ryan wrote:
> In case you haven't realised it, it is pretty
> much impossible for a large open source project to "die"; even if Guido
> decided to remove IDLE from the standard library
I don't remember stating that Python would die if IDLE was removed
(not sure if you mis
On Dec 27, 11:59 am, K Richard Pixley wrote:
> The problem is that IDLE is hard to set up. (I've never managed it and
> I'm a well seasoned veteran).
Can you qualify that statement? Do you mean "difficult to set up on
certain OS's"? Because for windows there is no difficulty.
> And [IDLE is] p
On Dec 27, 1:45 pm, Eelco wrote:
> On Dec 27, 6:53 pm, Lie Ryan wrote:
> > On 12/27/2011 10:41 PM, Eelco wrote:
> > Before using VIM, I used to use gedit
Eelco, please don't get offended, but can you (and everyone else) stop
using silly verbage like "used to", "use to", "suppose to", "hard"
whe
On Dec 27, 3:38 pm, Terry Reedy wrote:
> On 12/27/2011 1:04 PM, Rick Johnson wrote:
>
> > But this brings up a very important topic. Why do we even need triple
> > quote string literals to span multiple lines? Good question, and one i
> > have never really mused on until
On Dec 27, 5:10 pm, Steven D'Aprano wrote:
> On Sun, 25 Dec 2011 07:47:20 -0800, Eelco wrote:
> Your original use-case, where you want to change the type of tail from a
> list to something else, is simply solved by one extra line of code:
>
> head, *tail = sequence
> tail = tuple(tail)
i wonder i
On Dec 27, 3:44 pm, Eelco wrote:
> Despite the fact that you mis-attributed that quote to me, im going to
> be a little bit offended in the name of its actual author anyway.
> Thats a lot of words to waste on your linguistic preferences.
> Personally, I reserve the right to botch my non-native la
On Dec 27, 7:21 pm, 8 Dihedral
wrote:
> There are Dr.Python, Pycrust and Notepadplus to support writing python
> programs.
I really like Pycrust. It's written in Python, it's code base is
structured in a professional manner (IDLE you should be jealous!), and
it works well. However, it is de
On Dec 27, 8:21 pm, Tim Chase wrote:
> I'm glad you're open to learning more about English as "used to"
> is perfectly acceptable according to the World English Dictionary[1]
> [...]
> May you be found better for learning and come to give others the
> benefit of the doubt.
I don't care what ANY
Hello folks,
In a recent thread i stumbled upon an epiphany of sorts concerning
Python string literals, with implications that trickle down to all
forms of string literals used in general programming, since, for the
most part, the syntax is virtually the same!
For all our lives we have been excep
On Dec 27, 10:17 pm, Chris Angelico wrote:
> On Wed, Dec 28, 2011 at 2:49 PM, Rick Johnson
>
> wrote:
> > My proposal is to introduce a single delimiter for string literals. A
> > new string literal that is just as good at spanning single lines as it
> > is spanning mu
On Dec 27, 9:49 pm, Rick Johnson wrote:
> The fact is...even with the multi-line issue solved, we still have two
> forms of literal delimiters that encompass two characters resulting in
> *four* possible legal combinations of the exact same string! I don't
> know about you guy
On Dec 28, 12:58 am, Steven D'Aprano wrote:
> On Tue, 27 Dec 2011 21:34:19 -0800, Rick Johnson wrote:
> > I am also thinking that ANY quote char is a bad choice for string
> > literal delimiters. Why? Well because it is often necessary to embed
> > single or double qu
On Jan 2, 4:00 pm, Ethan Furman wrote:
> %-style formatting isn't going away.
You may want to freshen up on the definition of "deprecation". If it
was NOT going away, why the need to deprecate it? hmm? It would be
more beneficial if you DO NOT encourage continued usage of this "end-
of-life" feat
On Dec 31 2011, 12:19 pm, davidfx wrote:
> Hello everyone,
> I just have a quick question about .format and %r %s %d.
>
> Should we always be using .format() for formatting strings or %?
ALWAYS use the format method over the old and dumpy string
interpolation. Why? Well because the format method
On Dec 31 2011, 11:12 pm, Dominic Binks wrote:
> I doubt you could validate or invalidate a word. A word is, there is no
> validation necessary. You could potentially try to validate it's use
> but again that's not in your power.
Usage begets validation. By using words in a manner that is impr
On Jan 2, 8:38 pm, alex23 wrote:
> Conversely, you could pitch in behind Rick Johnson's Python 4000 fork,
> I sure it's progressing nicely given how long Rick has been talking it
> up.
It's NOT a fork Alex. It IS in fact the next logical step in Python'
On Jan 4, 9:56 am, Sean Wolfe wrote:
> I am still living in the 2.x world because all the things I want to do
> right now in python are in 2 (django, pygame). But I want to be
> excited about the future of the language.
Okay. So why not enjoy the best of both worlds (almost) and use
version 2.7.2
On Jan 3, 8:42 pm, Ben Finney wrote:
> Steven D'Aprano writes:
> > On Wed, 04 Jan 2012 12:54:09 +1100, Ben Finney wrote:
> > > It objectifies women.
>
> > So you claim.
>
> I'm sure you have a hundred ready rationalisations for why a joke that
> has “girlfriend” as a fungible object, together wit
On Jan 3, 8:37 pm, Chris Angelico wrote:
> On Wed, Jan 4, 2012 at 12:54 PM, Ben Finney
> wrote:
> > It objectifies women. If you can't see how that's harmful to women, I
> > haven't the stamina to educate you.
>
> And "import pickle" objectifies pickles. It's deplorable how few
> gherkins become
On Jan 1, 5:24 pm, Alexander Kapps wrote:
> Uh oh, should I really send this? ... Yes. Yes, I should! Sorry, I
> cannot resists.
>
> >>> allow everyone to do "import girlfriend"
> > I'm betting on a joke, like antigravity only significantly less
> > funny and more sexist.
>
> Absolutely not funny.
On Jan 8, 10:37 am, Sean Wolfe wrote:
> is anybody out there?
Oh yes, in fact there are many of us who are "out there".
http://www.youtube.com/watch?v=bHNa_f28Q-s
--
http://mail.python.org/mailman/listinfo/python-list
The interface for these modules is not intuitive. Instead of creating
true OOP objects we have lists and strings. Any calendar object should
expose string names of both: days of the week and months of the year.
It seems one (or possibly more) of the three expose this important
info however i cannot
On Jan 14, 1:01 pm, Devin Jeanpierre wrote:
> What's "horrendous" about the datetime module interface? Your listed
> complaints (OOP etc.) don't seem to have anything to do with it.
Well my immediate complaint about date-time is actually a problem with
the syntactic quandaries of the Python lang
On Jan 14, 1:23 pm, Rick Johnson wrote:
> def $method(self):pass
> self.@instanceveriable
> self.@@classvariable
Actually, class level methods can be accessed through
ClassIdentifier.method, and instance methods through
instanceidentifier.instancemethod. So decorating methods bec
On Jan 14, 2:58 pm, Evan Driscoll wrote:
> On 01/14/2012 02:11 PM, Devin Jeanpierre wrote:
> It also has some problems. For instance, if an object has a member which
> is a type that implements __call__ but is also useful to access "on its
> own", is that a field or a function?
Can you site a re
On Jan 14, 10:23 pm, Steven D'Aprano wrote:
> This is not Java, and we prefer Python terminology.
>
> A variable holding an int is an int variable.
> A variable holding a string is a string variable.
> A variable holding a list is a list variable.
> A variable holding an instance is an instance v
On Jan 17, 8:16 am, Jérôme wrote:
> Any comment is welcome, be it about code optimization, coding style,
> pythonification, good practices, or simply program features and usability.
Step one would be to show a screen shot in both English AND French
language. Besides, not everyone in this communi
On Jan 17, 1:38 pm, Ben Finney wrote:
> Jérôme writes:
> > Rick Johnson a écrit:
> > > Besides, not everyone in this community is a "card carrying"
> > > pacifist.
> > ?
> You have attracted the attention of a troll.
What is worse: A wolf, or a wo
On Jan 16, 12:03 am, "_" wrote:
> # THAT WHAT NEED EXPECT FROM OPERATORS OF PYTHON:
> Worddr = "56" # CREATE A STRING: "56"
> Word = ["12"] # CREATE A LIST WITH ONE SIGNED: "12"
> Word = Word.append("34") # APPEND TO LIST ONE MORE SIGNED: "34"
> Word = Word + "34" # MUST APPEND TO LIST ONE MORE SI
On Jan 18, 12:24 pm, John Nagle wrote:
> Please don't use "setuptools", the so-called "easy"
> installation system in your packages. It just makes things
> more complicated, adds dependencies, and needs too many weird
> options if things aren't exactly where it wants them. Since
> "setuptools
On Jan 19, 4:44 am, Jérôme wrote:
> - Most importantly, new 2.1 version comes with an absolutely pure french-free
> english-only screenshot, for your convenience.
Thanks for this update. However, i need to stress that while the
English language is fundamental to writing Python code, we are not
On Jan 20, 12:49 pm, Tamanna Sultana
wrote:
> > If you can give me some lead to fix the code I wrote below that will be
> > great:
Your variable names need a bit more thought
> def average(bin):
What is a "bin"? Maybe you shoulc have called this a "lst" eh?
> num=[]
Why would you call a l
What does Python do when presented with this code?
py> [line.strip('\n') for line in f.readlines()]
If Python reads all the file lines first and THEN iterates AGAIN to do
the strip; we are driving a Fred flintstone mobile. If however Python
strips each line of the lines passed into readlines in
On Jan 22, 2:08 pm, Jacob Hallén wrote:
> If I store these two files in say C:\Users\Admin\test everything works fine.
>
> If I store them in C:\Users\Admin\testф, I get an import error when running
> foo.py. The letter at the end of test is a Russian "F", if it looks strange on
> your terminal.
On Jan 22, 6:38 pm, Michael Torrie wrote:
> On 01/22/2012 08:50 AM, Rick Johnson wrote:
>
>
>
> > What does Python do when presented with this code?
>
> > py> [line.strip('\n') for line in f.readlines()]
>
> > If Python reads all the file lines
On Jan 22, 6:47 pm, Michael Torrie wrote:
> I once argued to limit Python identifiers to latin letters only, but at
> least that made some sort of sense (lowest-common denominator) and it
> had nothing to do with running in an internationalized environment or
> dealing with unicode or utf-8 -encod
# Quote: Daniel Rouse Jr. #
# To me, this looks like an array. Is tuple just the #
# Python name for an array?
On Wednesday, February 6, 2013 7:36:28 PM UTC-6, Ethan Furman wrote:
> As Michael Torrie pointed out, the 'global' keyword is needed:
Wrong. The global keyword is in fact NOT needed and something i consider to be
another wart of the language (PyWart on this subject coming soon!).
Now, whilst Mi
Python's use of namespaces is, as we all quite know, "one honking great idea!";
and i must wholeheartedly agree, however, accessing and declaring variables
living in python namespaces is a kludge at best, and a malevolent obfuscation
at worst!
On Monday, July 16, 2012 7:43:47 PM UTC-5, Steven D'Aprano wrote:
>
> [...]
>
> If I insist on making a single object do duty for both the jar and the
> jellybean count, then I need a "null jar object", and I probably end up
> with something like this:
>
> Jar(number_of_beans=None) => null ja
On Monday, July 16, 2012 8:45:51 PM UTC-5, rusi wrote:
> On Jul 15, 9:50 pm, Rick Johnson wrote:
> > I think this issue is not so much a "bool test" vs "type
> > test", but more an ambiguous syntax issue.
> >
>
> If you know some English, its
On Monday, July 16, 2012 11:18:28 PM UTC-5, Devin Jeanpierre wrote:
> On Mon, Jul 16, 2012 at 12:03 AM, Steven D'Aprano wrote:
> > On Sun, 15 Jul 2012 22:15:13 -0400, Devin Jeanpierre wrote:
> >
> >> For example, instead of "if stack:" or "if bool(stack):", we could use
> >> "if stack.isempty():".
On Tuesday, July 17, 2012 8:35:09 PM UTC-5, alex23 wrote:
> On Jul 17, 6:23 pm, Andrew Berg wrote:
>
> > On 7/17/2012 2:08 AM, Steven D'Aprano wrote:
>
> > > The default behaviour is that every object is something, hence true-like,
>
> > > unless explicitly coded to be treated as false-like. Si
On Tuesday, July 17, 2012 8:35:09 PM UTC-5, alex23 wrote:
> On Jul 17, 6:23 pm, Andrew Berg wrote:
> > On 7/17/2012 2:08 AM, Steven D'Aprano wrote:
> > > The default behaviour is that every object is something, hence true-like,
> > > unless explicitly coded to be treated as false-like. Since both
On Friday, February 8, 2013 12:27:09 AM UTC-6, Michael Torrie wrote:
> On 02/07/2013 11:16 PM, Rick Johnson wrote:
> > He is so accustomed to "guessing" that it has become second nature
> > for him.
>
> I think most of us are guessing as to what you're talking
On Friday, February 8, 2013 12:25:34 AM UTC-6, Chris Angelico wrote:
> On Fri, Feb 8, 2013 at 3:30 PM, Rick Johnson wrote:
> > It is my strong opinion that all "unqualified" variables must be local to
> > the containing block, func/meth, class, or module. To access any
On Friday, February 8, 2013 9:16:42 AM UTC-6, Steven D'Aprano wrote:
> Rick Johnson wrote:
>
> > GvR has always been reluctant to incorporate full OOP machinery for some
> > reason.
>
> Python is a fully object oriented language. It is *more* object oriented
On Friday, February 8, 2013 11:48:43 AM UTC-6, Rick Johnson wrote:
>
> [...]
>
> So using a /real/ OOP paridigm we would do the following:
>
> ## START TRUE OOP PARIDIGM ##
>
> [...snip naive example...]
Actually my example API is littered with artifacts of a
On Friday, February 8, 2013 6:05:54 PM UTC-6, Chris Angelico wrote:
> The sum builtin works happily on any sequence of objects
> that can be added together. It works as an excellent
> flatten() method:
>
> >>> nested_list = [["q"], ["w","e"], ["r","t","u"], ["i","o","p"]]
> >>> sum(nested_list,[])
801 - 900 of 1183 matches
Mail list logo