On Mar 19, 8:25 pm, maiden129 wrote:
> Here is my try to answer some of questions:
>
> [snip code]
I don't understand why you are wrapping this code into a class. Are
you trying to create something reuseable?
> I'm just struggling with only how to create an object that
> will hold a single chara
On Dec 26, 11:02 pm, Steven D'Aprano wrote:
> On Wed, 26 Dec 2012 20:07:53 -0800, Rick Johnson wrote:
> > My specific point is that the English word "variable" is unambiguous
>
> I'm sorry, do you mean "variable" the noun, or "variable" the adjective?
> [snip: sliding down the rabbit hole of a pol
On Dec 24, 9:48 am, Dave Angel wrote:
> Pep8 recommends a particular style within a function name, separating
> 'words of a name by underscore. I happen to loathe that style, so I'm
> clearly not the one who would critique someone for not following the
> guideline. I say getFile(), the pep says
On Jul 15, 11:20 pm, Steven D'Aprano wrote:
> (It's not like explicit and implicit are distinct -- everything depends
> on something implicit, if only the meaning of the words you use to
> describe it.)
>
> It certainly doesn't mean that the semantics of Python the language must
> be written out
On Jul 15, 11:03 pm, Steven D'Aprano wrote:
> On Sun, 15 Jul 2012 22:15:13 -0400, Devin Jeanpierre wrote:
> It boggles my mind that people who are perfectly happy to program to an
> interface or protocol when it comes to (say) iterables, numbers or even
> big complex classes with dozens of method
On Jul 15, 9:58 pm, Steven D'Aprano wrote:
> On Sun, 15 Jul 2012 18:21:06 -0700, Ranting Rick wrote:
> > If HOWEVER we want to "truth test" an object (as in: "if obj") we should
> > be FORCED to use the bool! Why? Because explicit is better than implici
On Jul 15, 9:15 pm, Devin Jeanpierre wrote:
> For example, instead of "if stack:" or "if bool(stack):", we could use
> "if stack.isempty():". This line tells us explicitly that stack is a
> container. Or instead of "if dist:" or "if bool(dist):" we could use
> "if dist == 0:". This tells us expli
On Jul 15, 9:13 pm, Steven D'Aprano wrote:
> I have just written a bunch of code with about two dozen examples similar
> to this:
>
> for item in (seq or []):
> do_something_with(item)
>
> iterates over seq if it is non-empty, or the empty list. Writing it like
> this would be more painful, m
On Jul 15, 8:51 pm, Chris Angelico wrote:
> On Mon, Jul 16, 2012 at 11:21 AM, Ranting Rick
>
> wrote:
> > If HOWEVER we want to "truth test" an object (as in: "if obj") we
> > should be FORCED to use the bool! Why? Because explicit is better than
> >
On Jul 15, 4:53 pm, Chris Angelico wrote:
> Then the construct "if bool(some_condition):" is redundant.
Wrong again, pay attention Chris!
It's ONLY redundant IF "some_condition" is a rich comparison: like
"(a==b)" OR a boolean function: like "callable(a)".
If HOWEVER we want to "truth test" an
10 matches
Mail list logo