Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #90316 > unrolled thread

Re: anomaly

Started byMark Lawrence <breamoreboy@yahoo.co.uk>
First post2015-05-11 01:19 +0100
Last post2015-05-11 00:16 -0700
Articles 18 — 8 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: anomaly Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-11 01:19 +0100
    Re: anomaly zipher <dreamingforward@gmail.com> - 2015-05-10 17:57 -0700
      Re: anomaly Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-11 16:11 +1000
        Re: anomaly zipher <dreamingforward@gmail.com> - 2015-05-11 07:23 -0700
          Re: anomaly Skip Montanaro <skip.montanaro@gmail.com> - 2015-05-11 09:45 -0500
            Re: anomaly zipher <dreamingforward@gmail.com> - 2015-05-11 08:11 -0700
              Re: anomaly Skip Montanaro <skip.montanaro@gmail.com> - 2015-05-11 10:48 -0500
                Re: anomaly zipher <dreamingforward@gmail.com> - 2015-05-11 09:43 -0700
                  Re: anomaly Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-12 11:59 +1000
              Re: anomaly Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-11 17:12 +0100
            Re: anomaly Grant Edwards <invalid@invalid.invalid> - 2015-05-11 15:34 +0000
              Re: anomaly zipher <dreamingforward@gmail.com> - 2015-05-11 08:39 -0700
                Re: anomaly alex23 <wuwei23@gmail.com> - 2015-05-12 15:02 +1000
                  Re: anomaly Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-12 12:56 +0100
                  Re: anomaly Grant Edwards <invalid@invalid.invalid> - 2015-05-12 15:36 +0000
              Re: anomaly Emile van Sebille <emile@fenx.com> - 2015-05-11 15:36 -0700
          Re: anomaly Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-12 01:55 +1000
      Re: anomaly lorenzo.gatti@gmail.com - 2015-05-11 00:16 -0700

#90316 — Re: anomaly

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2015-05-11 01:19 +0100
SubjectRe: anomaly
Message-ID<mailman.330.1431303600.12865.python-list@python.org>
On 11/05/2015 01:14, Mark Rosenblitt-Janssen wrote:
> In case the example given at the start of the thread wasn't
> interesting enough, it also works in the other direction:
>
>>>> class str(int):  pass
>
>>>> str('2')
> 2  #<----- an integer!!!
>
> Mark
>

Thanks for this, I've not found anybody new for my dream team in months.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [next] | [standalone]


#90318

Fromzipher <dreamingforward@gmail.com>
Date2015-05-10 17:57 -0700
Message-ID<6f508ac2-0765-46b2-9408-955e7c811127@googlegroups.com>
In reply to#90316
On Sunday, May 10, 2015 at 7:20:13 PM UTC-5, Mark Lawrence wrote:
> On 11/05/2015 01:14, Mark Rosenblitt-Janssen wrote:
> > In case the example given at the start of the thread wasn't
> > interesting enough, it also works in the other direction:
> >
> >>>> class str(int):  pass
> >
> >>>> str('2')
> > 2  #<----- an integer!!!
> >
> > Mark
> >
> 
> Thanks for this, I've not found anybody new for my dream team in months.

Sorry, I forgot I unsubscribed from the mailing list and didn't see any replies and deduced that no one had noticed anything unexpected about the idea. 

I guess everyone expects this behavior since Python implemented this idea of "everything is an object", but I think this branch of OOP (on the branch of the Tree of Programming Languages) has to be chopped off.  The idea of everything is an object is backwards (unless your in a LISP machine).  Like I say, it's trying to be too pure and not practical.

Whatever,

Mark

[toc] | [prev] | [next] | [standalone]


#90347

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2015-05-11 16:11 +1000
Message-ID<55504803$0$13004$c3e8da3$5496439d@news.astraweb.com>
In reply to#90318
On Monday 11 May 2015 10:57, zipher wrote:

> I guess everyone expects this behavior since Python implemented this idea
> of "everything is an object", but I think this branch of OOP (on the
> branch of the Tree of Programming Languages) has to be chopped off.  The
> idea of everything is an object is backwards (unless your in a LISP
> machine).  Like I say, it's trying to be too pure and not practical.


Python is in production use in hundreds of thousands of organisations. It 
has been heavily used for over twenty years, in everything from quick and 
dirty one line scripts to hundred-thousand LOC applications. As well as the 
obvious OOP features, it includes features and idioms from imperative, 
procedural, functional and pipe-lining programming languages, with explicit 
influence from Pascal, C, Haskell, Dylan and Lisp, among others.

Yeah, "too pure and not practical". You're a funny guy.


-- 
Steve

[toc] | [prev] | [next] | [standalone]


#90384

Fromzipher <dreamingforward@gmail.com>
Date2015-05-11 07:23 -0700
Message-ID<a93604dd-74d6-42a8-b197-406e8fa15467@googlegroups.com>
In reply to#90347
On Monday, May 11, 2015 at 1:11:26 AM UTC-5, Steven D'Aprano wrote:
> On Monday 11 May 2015 10:57, zipher wrote: 
> > I guess everyone expects this behavior since Python implemented this idea
> > of "everything is an object", but I think this branch of OOP (on the
> > branch of the Tree of Programming Languages) has to be chopped off.  The
> > idea of everything is an object is backwards (unless your in a LISP
> > machine).  Like I say, it's trying to be too pure and not practical.
> 
> Python is in production use in hundreds of thousands of organisations. It 
> has been heavily used for over twenty years, in everything from quick and 
> dirty one line scripts to hundred-thousand LOC applications. 

Yeah, so was COBOL.  Boom.

Mark

[toc] | [prev] | [next] | [standalone]


#90387

FromSkip Montanaro <skip.montanaro@gmail.com>
Date2015-05-11 09:45 -0500
Message-ID<mailman.367.1431355924.12865.python-list@python.org>
In reply to#90384
Steven> Python is in production use in hundreds of thousands of
organisations. It
Steven> has been heavily used for over twenty years, in everything
from quick and
Steven> dirty one line scripts to hundred-thousand LOC applications.

Mark> Yeah, so was COBOL.  Boom.

Your point being?

The software development landscape has changed so much since the days
when COBOL was king of data processing that its popularity then had
less to do with some sort of software natural selection than IBM's
utter domination of the computing landscape in the 1960s. If you
bought IBM's hardware (as almost everyone did *), you also got what
they offered in the way of software. I believe (though this is
certainly before my time in the industry) that basically meant FORTRAN
or COBOL (maybe APL? Wow, I've mentioned it twice in one day). In
contrast, software developers and project managers had plenty of
options available when they chose Python.

Skip

* Searching Google for "If it's blue, buy two" doesn't turn up any
obvious hits for this old aphorism (roughly meaning, "If you need to
buy computers, buying IBM is a safe bet", or more to the professional
bottom line of the person making the decision, "Nobody's going to fire
you if you buy an IBM mainframe and it turns out to be the wrong
choice"). Am I the only person who remembers it?

[toc] | [prev] | [next] | [standalone]


#90391

Fromzipher <dreamingforward@gmail.com>
Date2015-05-11 08:11 -0700
Message-ID<b05b09d6-9585-41d7-b573-b3c331681d89@googlegroups.com>
In reply to#90387
On Monday, May 11, 2015 at 9:52:16 AM UTC-5, Skip Montanaro wrote:
> Steven> Python is in production use in hundreds of thousands of
> organisations. It
> Steven> has been heavily used for over twenty years, in everything
> from quick and
> Steven> dirty one line scripts to hundred-thousand LOC applications.
> 
> Mark> Yeah, so was COBOL.  Boom.
> 
> Your point being?

That a billion lines of code doesn't equate to practicality. 

> The software development landscape has changed so much since the days
> when COBOL was king of data processing that its popularity then had
> less to do with some sort of software natural selection than IBM's
> utter domination of the computing landscape in the 1960s. 

Yes, and I would argue that the OOP landscape has changed since the 1990s (with the rise of very high level languages like Python).  The idea of "everything is an object" is an exploration of PL design that I'm claiming is not appropriate for whatever language will create this data ecosystem that I say is as inevitable as a single language being used on the Internet -- it's simply a chaotic attractor that is irresistible for it's sheer utility.

I also bought the idea of everything as an object, it has a unbeatable purity to it.  But we won't ever get to the point were OOP is like the purity of math because the greatest utility of OOP is working with real-world data.  And that real-world puts bounds on the otherwise abstract purity in which a language is theoretically capable.

Mark

P.S. As Mr. Reedy said, please remove pydev from the To: line.  This is the proper general rule when a discussion goes into abstractions, rather than practicality of development.

[toc] | [prev] | [next] | [standalone]


#90404

FromSkip Montanaro <skip.montanaro@gmail.com>
Date2015-05-11 10:48 -0500
Message-ID<mailman.372.1431359322.12865.python-list@python.org>
In reply to#90391
On Mon, May 11, 2015 at 10:11 AM, zipher <dreamingforward@gmail.com> wrote:
> I also bought the idea of everything as an object, it has a unbeatable purity to it.  But we won't ever get to the point were OOP is like the purity of math because the greatest utility of OOP is working with real-world data.  And that real-world puts bounds on the otherwise abstract purity in which a language is theoretically capable.

Did someone here say it would? Sure, OOP isn't as pure as math, but
most object-oriented languages aren't pure OO languages, either.
(Maybe Smalltalk?) In Python, when you want to manipulate bazillions
of numbers, you use numpy, pandas, etc. In C++, you code in the C
subset it (still) contains when you don't want objects.

The practicality side of things suggests that even though
everything-is-an-object isn't perfect, it may be good enough.
People/projects/companies generally can't afford to follow every
change that blows through their environment. That's why (for example),
COBOL lasted so long. In fact, I suspect you could still make a good
living writing COBOL, if you really wanted to. (Searching indeed.com
for "COBOL" in Chicago, IL gave me 81 hits.)

Python was never meant to be "pure". It has, by Guido's own admission,
borrowed ideas from many other languages. Very little in Python is
truly new, certainly not its object model. At the user level
everything appears to be an object, but not everything is under the
covers (e.g., numeric elements of array objects).

Skip

[toc] | [prev] | [next] | [standalone]


#90412

Fromzipher <dreamingforward@gmail.com>
Date2015-05-11 09:43 -0700
Message-ID<e6d39278-c569-4229-9713-94b426ae6e02@googlegroups.com>
In reply to#90404
On Monday, May 11, 2015 at 10:49:01 AM UTC-5, Skip Montanaro wrote:
> On Mon, May 11, 2015 at 10:11 AM, zipher <dreamingforward@gmail.com> wrote:
> > I also bought the idea of everything as an object, it has a unbeatable purity to it.  But we won't ever get to the point were OOP is like the purity of math because the greatest utility of OOP is working with real-world data.  And that real-world puts bounds on the otherwise abstract purity in which a language is theoretically capable.
> 
> Did someone here say it would? Sure, OOP isn't as pure as math, but
> most object-oriented languages aren't pure OO languages, either.

SKip, it's fine to have a loose definition of things in a language when you're not sure where you want it to go.  I think taking Python into the land of "everything is an object" was a neat exploration.  I even supported it.  But, now that I want to create a data ecosystem, sloppiness in design criteria or inadequacies in implementation gets exercised.  Perhaps it won't be Python's goals, but I would argue that it's the best direction for Python.

These aren't failings of the dev-team either -- no one's done this before.  There are some attempts like CORBA, but either they remained in proprietary domains or they simply weren't capable of scaling to every kind of data.  I've, in fact, had to invent a new data structure to do it, a data structure I'm implementing in Python and where the issue of the *nature* of OOP came to the fore.

For example, have you ever contemplated this:

class WeightedVertex(vertex_common(Vertex(dict))):
    """test class"""

That currently isn't valid Python code, but the idea is that I'm making composite objects that expand one upon the other -- another basic idea in the realm of theoretical OOP that this boneheaded community couldn't wrap it's head around.

Anyway, I'm also saying that it's better to have real design goals when such noble goals can be made, rather than be content with a sloppy flexibility.

> The practicality side of things suggests that even though
> everything-is-an-object isn't perfect, it may be good enough.
> People/projects/companies generally can't afford to follow every
> change that blows through their environment.

True.  Which is why theoretical CS exists -- to find deeper and better abstractions to encompass everything you want to do.  It started with variables, then linked lists, then trees, then graphs and I'm taking that trajectory to it's end point.  It's real Computer Science.  Most people here haven't seemed to understand the power of Graphs yet, or perhaps they just can't agree upon an API so leave out such a powerful data structure.  I'm currently refactoring my own implementation, so that it could be considered for inclusion in the collections module.

Mark

P.S. Sorry for the "boneheaded" insult -- I get called anything from a troll to a drug addict around here.

[toc] | [prev] | [next] | [standalone]


#90428

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2015-05-12 11:59 +1000
Message-ID<55515e72$0$12994$c3e8da3$5496439d@news.astraweb.com>
In reply to#90412
On Tue, 12 May 2015 02:43 am, zipher wrote:

> For example, have you ever contemplated this:
> 
> class WeightedVertex(vertex_common(Vertex(dict))):
> """test class"""


No.

> That currently isn't valid Python code, 

Yes it is. You just have to arrange matters so that
vertex_common(Vertex(dict)) returns a type.


> but the idea is that I'm making 
> composite objects that expand one upon the other -- another basic idea in
> the realm of theoretical OOP that this boneheaded community couldn't wrap
> it's head around.

Yes, I'm sure that from where you are floating around in space way beyond
the stratosphere, we must all look like feeble-minded ants.

http://www.joelonsoftware.com/articles/fog0000000018.html

But at least we know what is valid Python and what isn't.



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#90408

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2015-05-11 17:12 +0100
Message-ID<mailman.375.1431360753.12865.python-list@python.org>
In reply to#90391
On 11/05/2015 16:48, Skip Montanaro wrote:
> On Mon, May 11, 2015 at 10:11 AM, zipher <dreamingforward@gmail.com> wrote:
>> I also bought the idea of everything as an object, it has a unbeatable purity to it.  But we won't ever get to the point were OOP is like the purity of math because the greatest utility of OOP is working with real-world data.  And that real-world puts bounds on the otherwise abstract purity in which a language is theoretically capable.
>
> Did someone here say it would? Sure, OOP isn't as pure as math, but
> most object-oriented languages aren't pure OO languages, either.
> (Maybe Smalltalk?) In Python, when you want to manipulate bazillions
> of numbers, you use numpy, pandas, etc. In C++, you code in the C
> subset it (still) contains when you don't want objects.
>
> The practicality side of things suggests that even though
> everything-is-an-object isn't perfect, it may be good enough.
> People/projects/companies generally can't afford to follow every
> change that blows through their environment. That's why (for example),
> COBOL lasted so long. In fact, I suspect you could still make a good
> living writing COBOL, if you really wanted to. (Searching indeed.com
> for "COBOL" in Chicago, IL gave me 81 hits.)
>
> Python was never meant to be "pure". It has, by Guido's own admission,
> borrowed ideas from many other languages. Very little in Python is
> truly new, certainly not its object model. At the user level
> everything appears to be an object, but not everything is under the
> covers (e.g., numeric elements of array objects).
>
> Skip
>

Are you aware that you're attempting to communicate with a known troll 
who thankfully has been absent for some years?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#90400

FromGrant Edwards <invalid@invalid.invalid>
Date2015-05-11 15:34 +0000
Message-ID<miqi5k$id1$1@reader1.panix.com>
In reply to#90387
On 2015-05-11, Skip Montanaro <skip.montanaro@gmail.com> wrote:

>> Python is in production use in hundreds of thousands of
>> organisations. It has been heavily used for over twenty years, in
>> everything from quick and dirty one line scripts to hundred-thousand
>> LOC applications.
>
> Mark> Yeah, so was COBOL.  Boom.
>
> Your point being?

That Python, like COBOL, is an eminently practical language.

-- 
Grant Edwards               grant.b.edwards        Yow! YOU PICKED KARL
                                  at               MALDEN'S NOSE!!
                              gmail.com            

[toc] | [prev] | [next] | [standalone]


#90401

Fromzipher <dreamingforward@gmail.com>
Date2015-05-11 08:39 -0700
Message-ID<03e4e251-20b0-4a2f-968e-2d40d2b5dc1e@googlegroups.com>
In reply to#90400
On Monday, May 11, 2015 at 10:34:24 AM UTC-5, Grant Edwards wrote:
> On 2015-05-11, Skip Montanaro <skip.montanaro@gmail.com> wrote:
> >> Python is in production use in hundreds of thousands of
> >> organisations. It has been heavily used for over twenty years, in
> >> everything from quick and dirty one line scripts to hundred-thousand
> >> LOC applications.
> >
> > Mark> Yeah, so was COBOL.  Boom.
> >
> > Your point being?
> 
> That Python, like COBOL, is an eminently practical language.

LOL!  Good one.

mark

[toc] | [prev] | [next] | [standalone]


#90431

Fromalex23 <wuwei23@gmail.com>
Date2015-05-12 15:02 +1000
Message-ID<mis1e9$oq2$1@dont-email.me>
In reply to#90401
On 12/05/2015 1:39 AM, zipher wrote:
> On Monday, May 11, 2015 at 10:34:24 AM UTC-5, Grant Edwards wrote:
>> That Python, like COBOL, is an eminently practical language.
>
> LOL!  Good one.

I would make an incredibly substantial wager that you've never developed 
anything of note in either Python or COBOL.

[toc] | [prev] | [next] | [standalone]


#90444

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2015-05-12 12:56 +0100
Message-ID<mailman.392.1431431792.12865.python-list@python.org>
In reply to#90431
On 12/05/2015 06:02, alex23 wrote:
> On 12/05/2015 1:39 AM, zipher wrote:
>> On Monday, May 11, 2015 at 10:34:24 AM UTC-5, Grant Edwards wrote:
>>> That Python, like COBOL, is an eminently practical language.
>>
>> LOL!  Good one.
>
> I would make an incredibly substantial wager that you've never developed
> anything of note in either Python or COBOL.
>

Why waste the final seven words?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#90456

FromGrant Edwards <invalid@invalid.invalid>
Date2015-05-12 15:36 +0000
Message-ID<mit6lg$jp8$1@reader1.panix.com>
In reply to#90431
On 2015-05-12, alex23 <wuwei23@gmail.com> wrote:
> On 12/05/2015 1:39 AM, zipher wrote:
>> On Monday, May 11, 2015 at 10:34:24 AM UTC-5, Grant Edwards wrote:
>>> That Python, like COBOL, is an eminently practical language.
>>
>> LOL!  Good one.
>
> I would make an incredibly substantial wager that you've never developed 
> anything of note in either Python or COBOL.

I've write a lot of Python code over the past 15 years.  I only made
one attempt at a COBOL program.  It was using punch cards and a
card-reader connected to a remote mainframe via a 2400 baud link. That
was not fun.

I'm not sure what your point is, though.

COBOL may be an ugly, icky, language, but you must admit it is
_practical_.  It can be used to get real work done.

-- 
Grant Edwards               grant.b.edwards        Yow! Where does it go when
                                  at               you flush?
                              gmail.com            

[toc] | [prev] | [next] | [standalone]


#90422

FromEmile van Sebille <emile@fenx.com>
Date2015-05-11 15:36 -0700
Message-ID<mailman.382.1431383793.12865.python-list@python.org>
In reply to#90400
On 5/11/2015 8:34 AM, Grant Edwards wrote:

 > Yow! YOU PICKED KARL
 > MALDEN'S NOSE!!

I'd bet most people familiar with Karl Malden wouldn't have a
problem picking his from a selection of twenty random noses.  :)

Emile

[toc] | [prev] | [next] | [standalone]


#90405

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2015-05-12 01:55 +1000
Message-ID<5550d102$0$12985$c3e8da3$5496439d@news.astraweb.com>
In reply to#90384
On Tue, 12 May 2015 12:23 am, zipher wrote:

> On Monday, May 11, 2015 at 1:11:26 AM UTC-5, Steven D'Aprano wrote:
>> On Monday 11 May 2015 10:57, zipher wrote:
>> > I guess everyone expects this behavior since Python implemented this
>> > idea of "everything is an object", but I think this branch of OOP (on
>> > the
>> > branch of the Tree of Programming Languages) has to be chopped off. 
>> > The idea of everything is an object is backwards (unless your in a LISP
>> > machine).  Like I say, it's trying to be too pure and not practical.
>> 
>> Python is in production use in hundreds of thousands of organisations. It
>> has been heavily used for over twenty years, in everything from quick and
>> dirty one line scripts to hundred-thousand LOC applications.
> 
> Yeah, so was COBOL.  Boom.

So *is* COBOL. (Except for the one-line scripts part.)

COBOL is nearly as old as Fortran, half a century old, and reports of its
death are grossly exaggerated. It might not be a nice language, or a
particularly modern language (even though it now has OOP features!) but,
like the cockroach, it's hard to kill.

It's a running gag in IT circles that "the imminent death of COBOL" is
predicted every year, and will continue to be predicted every year well
into the 2100s.



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#90353

Fromlorenzo.gatti@gmail.com
Date2015-05-11 00:16 -0700
Message-ID<d3d661fd-019a-4cfd-97b5-f2ddf1551d93@googlegroups.com>
In reply to#90318
On Monday, May 11, 2015 at 2:58:09 AM UTC+2, zipher wrote:
> I guess everyone expects this behavior since Python implemented this idea of "everything is an object", but I think this branch of OOP (on the branch of the Tree of Programming Languages) has to be chopped off.  The idea of everything is an object is backwards (unless your in a LISP machine).  Like I say, it's trying to be too pure and not practical.

Expressing this sort of emphatic, insulting and superficial opinions, to the people who would be most irritated by them (the Python mailing list) and without the slightest interest for contrary viewpoints and constructive discussion, is a very unpleasant form of trolling. 

If you don't like Python, you are welcome to prefer other programming languages. If you want to use Python with C-like primitive types, you can use arrays. Both choices are perfectly good, and routinely made without bothering other people with inane conversations.

Lorenzo Gatti

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web