Thanks a lot. It is quite helpful to follow the thought process here.
Another person gave the example of 'Calibre', but I've found it
overwhelming and I couldn't find any UML diagram there (maybe not searched
hard enough).
Regards,
Felix
--
https://mail.python.org/mailman/listinfo/python-list
On 01.10.2014 10:14, math math wrote:
Hi,
I hope there are people here with strong OOP experience.
Which classes would an object-oriented python programmer create for the design
of a e-book reader for example? I am not really interested in the code, just
the OOP classes that would come to one
Hi,
I hope there are people here with strong OOP experience.
Which classes would an object-oriented python programmer create for the design
of a e-book reader for example? I am not really interested in the code, just
the OOP classes that would come to one's mind for a task like this.
It should
On Wed, Aug 6, 2014 at 1:37 AM, Neil D. Cerutti wrote:
> In simple cases like that, functions could do very well by including a
> little bundle of data (probably a dict) as one of the parameters for each
> related function.
And this is exactly how object orientation is done in C. You just have
a
On 8/4/2014 6:44 PM, John Gordon wrote:
In Shubham Tomar
writes:
classes. I understand that you define classes to have re-usable methods and
procedures, but, don't functions serve the same purpose.
Can someone please explain the idea of classes
If a function simply accepts some data, does
, ...)
as a higher level building block -- and this leads to classes.
A "class" (in Python) is a collection of related functions (called
"method"s) and potentially data definitions (this part is quite
weak for Python classes; unlike in other languages, the data part
of a class
On 8/4/2014 6:44 PM, John Gordon wrote:
__init__() is the initializer method, which is called as one step of
creating a class object.
In fact, it is the last step and usually is the main step for
user-defined classes, and the only step one need be concerned with.
Object is the lowest-level
In Shubham Tomar
writes:
> classes. I understand that you define classes to have re-usable methods and
> procedures, but, don't functions serve the same purpose.
> Can someone please explain the idea of classes
If a function simply accepts some data, does some calculations on that
data and th
On 8/4/2014 4:40 AM, Shubham Tomar wrote:
Hi,
Python is the first programming language that I'm learning.
I'm confused by the idea of classes and intimidated by syntax defining
classes. I understand that you define classes to have re-usable methods
and procedures, but, don't functions serve the
Hi,
Python is the first programming language that I'm learning.
I'm confused by the idea of classes and intimidated by syntax defining
classes. I understand that you define classes to have re-usable methods and
procedures, but, don't functions serve the same purpose.
Can someone please explain the
On 20 November 2013 12:57, Steven D'Aprano
wrote:
> On Wed, 20 Nov 2013 10:32:08 +1000, alex23 wrote:
>>
>> They appear to be resurrecting a 12 year old thread.
>
> Wow, that's one slow News server.
http://en.wikipedia.org/wiki/Slow_Movement
:)
--
https://mail.python.org/mailman/listinfo/python
On Wed, 20 Nov 2013 10:32:08 +1000, alex23 wrote:
> On 20/11/2013 12:12 AM, Chris Angelico wrote:
>> On Wed, Nov 20, 2013 at 12:50 AM, Annmarina Nagy
>> wrote:
>>> the command label gets "stuck"
>>
>> A bit of context would help hugely. Are you replying to someone else's
>> post? All we have is a
On 20/11/2013 12:12 AM, Chris Angelico wrote:
On Wed, Nov 20, 2013 at 12:50 AM, Annmarina Nagy wrote:
the command label gets "stuck"
A bit of context would help hugely. Are you replying to someone else's
post? All we have is a subject line.
They appear to be resurrecting a 12 year old threa
On Wed, Nov 20, 2013 at 12:50 AM, Annmarina Nagy wrote:
> the command label gets "stuck"
A bit of context would help hugely. Are you replying to someone else's
post? All we have is a subject line.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
the command label gets "stuck"
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 02 Nov 2012 09:08:07 +0100, Martin Hewitson wrote:
> Even if one takes reasonable numbers: 20 methods, each method has 20
> lines of documentation, then we immediately have 400 lines in the file
> before writing a line of code. It would seem much more natural to me to
> have these methods
On Sat, 03 Nov 2012 01:06:45 +, Steven D'Aprano wrote:
> 100 lines is approximately and a half pages using a 10pt font size
> (depending on the font and the platform, of course).
Crap. I meant approx *one* and a half pages.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 02 Nov 2012 07:16:09 +0100, Martin Hewitson wrote:
> I'm beginning a large Python project which contains many packages,
> modules and classes. The organisation of those is clear to me.
[...]
> I don't like having source files with
> 100's of lines of code in, let alone 1000's.
Why? Do you
Martin Hewitson writes:
>> you want just ONE method, something like "map"...
> Well, because one of the features that the framework will have is to
> capture history steps (in a tree structure) so that each processing
> step the user does is tracked. So while methods such as abs(), cos(),
> etc wi
On 2, Nov, 2012, at 06:24 PM, Paul Rubin wrote:
> Martin Hewitson writes:
>> Well, here we disagree. Suppose I have a class which encapsulates
>> time-series data. Below is a list of the absolute minimum methods one
>> would have to process that data. ...
>> 'abs'
>> 'acos'
>> 'asin'
>>
Martin Hewitson writes:
> Well, here we disagree. Suppose I have a class which encapsulates
> time-series data. Below is a list of the absolute minimum methods one
> would have to process that data. ...
> 'abs'
> 'acos'
> 'asin'
> ...
Ok, THERE is your problem. Why do you have separ
On 02/11/2012 14:49, Martin Hewitson wrote:
[Top posting fixed]
BTW: If you told us which language(s) you have a background in, it could be
easier to help you with identifying the idioms in that language that turn into
misconceptions when applied to Python.
Greetings!
Uli
[1] Actual
>
>
> BTW: If you told us which language(s) you have a background in, it could be
> easier to help you with identifying the idioms in that language that turn
> into misconceptions when applied to Python.
I'm considering porting some MATLAB code to python to move away from commercial
software
On 2, Nov, 2012, at 11:49 AM, Ulrich Eckhardt
wrote:
> Am 02.11.2012 09:20, schrieb Martin Hewitson:
>> Well, here we disagree. Suppose I have a class which encapsulates
>> time-series data. Below is a list of the absolute minimum methods one
>> would have to process that data.
> [...]
> > 'abs
Am 02.11.2012 09:08, schrieb Martin Hewitson:
On 2, Nov, 2012, at 08:38 AM, Paul Rubin
wrote:
Martin Hewitson writes:
So, is there a way to put these methods in their own files and
have them 'included' in the class somehow? ... Is there an
official python way to do this? I don't like having s
Am 02.11.2012 09:20, schrieb Martin Hewitson:
Well, here we disagree. Suppose I have a class which encapsulates
time-series data. Below is a list of the absolute minimum methods one
would have to process that data.
[...]
> 'abs' 'acos' 'asin' 'atan' 'atan2' 'average' 'cohere' 'conv' 'corr'
> 'co
On 11/2/12 10:48 AM, Mark Lawrence wrote:
On 02/11/2012 08:45, Martin Hewitson wrote:
On 2, Nov, 2012, at 09:40 AM, Mark Lawrence wrote:
On 02/11/2012 08:08, Martin Hewitson wrote:
Even if one takes reasonable numbers: 20 methods, each method has 20 lines
of documentation, then we immediat
On 11/2/12 10:21 AM, Peter Otten wrote:
Martin Hewitson wrote:
On 2, Nov, 2012, at 09:40 AM, Mark Lawrence
wrote:
20 lines of documentation per method? As far as I'm concerned that's not
a smell, that's a stink.
Wow, I don't think I've ever been criticised before for writing too much
doc
On 02/11/2012 08:45, Martin Hewitson wrote:
On 2, Nov, 2012, at 09:40 AM, Mark Lawrence wrote:
On 02/11/2012 08:08, Martin Hewitson wrote:
Even if one takes reasonable numbers: 20 methods, each method has 20 lines of
documentation, then we immediately have 400 lines in the file before writ
On Fri, 02 Nov 2012 08:40:06 +, Mark Lawrence wrote:
> On 02/11/2012 08:08, Martin Hewitson wrote:
>>
>> Even if one takes reasonable numbers: 20 methods, each method has 20
>> lines of documentation, then we immediately have 400 lines in the file
>> before writing a line of code. It would see
Martin Hewitson wrote:
> On 2, Nov, 2012, at 09:40 AM, Mark Lawrence
> wrote:
>> 20 lines of documentation per method? As far as I'm concerned that's not
>> a smell, that's a stink.
>
> Wow, I don't think I've ever been criticised before for writing too much
> documentation :)
>
> I guess we
On 02/11/2012 08:16, Martin Hewitson wrote:
Dear list,
I'm relatively new to Python and have googled and googled but haven't found a
reasonable answer to this question, so I thought I'd ask it here.
I'm beginning a large Python project which contains many packages, modules and
classes. The or
On 2, Nov, 2012, at 09:40 AM, Mark Lawrence wrote:
> On 02/11/2012 08:08, Martin Hewitson wrote:
>>
>> Even if one takes reasonable numbers: 20 methods, each method has 20 lines
>> of documentation, then we immediately have 400 lines in the file before
>> writing a line of code. It would seem
On Fri, Nov 2, 2012 at 7:08 PM, Martin Hewitson wrote:
>
> On 2, Nov, 2012, at 08:38 AM, Paul Rubin wrote:
>
>> Martin Hewitson writes:
>>> So, is there a way to put these methods in their own files and have
>>> them 'included' in the class somehow? ... Is there an official python
>>> way to do
Martin Hewitson wrote:
>
> On 2, Nov, 2012, at 09:00 AM, Peter Otten <__pete...@web.de> wrote:
>
>> Martin Hewitson wrote:
>>
>>> Dear list,
>>>
>>> I'm relatively new to Python and have googled and googled but haven't
>>> found a reasonable answer to this question, so I thought I'd ask it
>>>
On 11/2/12 8:20 AM, Martin Hewitson wrote:
On 2, Nov, 2012, at 09:00 AM, Peter Otten <__pete...@web.de> wrote:
Martin Hewitson wrote:
Dear list,
I'm relatively new to Python and have googled and googled but haven't
found a reasonable answer to this question, so I thought I'd ask it here.
I
On 02/11/2012 08:08, Martin Hewitson wrote:
Even if one takes reasonable numbers: 20 methods, each method has 20 lines of
documentation, then we immediately have 400 lines in the file before writing a
line of code. It would seem much more natural to me to have these methods in
their own file,
On 2, Nov, 2012, at 09:00 AM, Peter Otten <__pete...@web.de> wrote:
> Martin Hewitson wrote:
>
>> Dear list,
>>
>> I'm relatively new to Python and have googled and googled but haven't
>> found a reasonable answer to this question, so I thought I'd ask it here.
>>
>> I'm beginning a large Pyth
On 2, Nov, 2012, at 08:38 AM, Paul Rubin wrote:
> Martin Hewitson writes:
>> So, is there a way to put these methods in their own files and have
>> them 'included' in the class somehow? ... Is there an official python
>> way to do this? I don't like having source files with 100's of lines
>> of
Martin Hewitson wrote:
> Dear list,
>
> I'm relatively new to Python and have googled and googled but haven't
> found a reasonable answer to this question, so I thought I'd ask it here.
>
> I'm beginning a large Python project which contains many packages, modules
> and classes. The organisation
Martin Hewitson writes:
> So, is there a way to put these methods in their own files and have
> them 'included' in the class somehow? ... Is there an official python
> way to do this? I don't like having source files with 100's of lines
> of code in, let alone 1000's.
That code sounds kind of sme
Dear list,
I'm relatively new to Python and have googled and googled but haven't found a
reasonable answer to this question, so I thought I'd ask it here.
I'm beginning a large Python project which contains many packages, modules and
classes. The organisation of those is clear to me.
Now, the
Many thanks to all who responded to my "Python Classes: Simplify?" thread.
There seem to be several good reasons for this particular syntactical
choice, I am all the wiser for your kind explanations. My faith in the
simplicity and elegance of this beautiful language is reinforced.
Steven Lehar wrote:
It seems to me that the Python class system is needlessly confusing.
Am I missing something?
For example in the class Complex given in the documentation
*class Complex:*
*def __init__(self, realpart, imagpart):*
*self.r = realpart*
*self.i = imagpart*
*
The issue of explicitly naming a "self" parameter has been discussed in
depth on a number of occasions. I recommend a google search for "python
implicit self" for some of the reasons why it exists. Here's what Guido
has to say about it:
http://neopythonic.blogspot.com/2008/10/why-explicit-self-h
On 03/22/2012 10:51 AM, Steven Lehar wrote:
It seems to me that the Python class system is needlessly confusing.
Am I missing something?
For example in the class Complex given in the documentation
*class Complex:*
*def __init__(self, realpart, imagpart):*
*self.r = realpart*
*
On Thu, Mar 22, 2012 at 3:51 AM, Steven Lehar wrote:
> It seems to me that the Python class system is needlessly confusing. Am I
> missing something?
Explicit `self` is slightly annoying, but you'll get over it quickly (trust me).
> For example in the class Complex given in the documentation
>
>
On Thu, Mar 22, 2012 at 9:51 PM, Steven Lehar wrote:
> It seems to me that the Python class system is needlessly confusing. Am I
> missing something?
>
> For example in the class Complex given in the documentation
>
> class Complex:
> def __init__(self, realpart, imagpart):
> self.r =
It seems to me that the Python class system is needlessly confusing. Am I
missing something?
For example in the class Complex given in the documentation
*class Complex:*
*def __init__(self, realpart, imagpart):*
*self.r = realpart*
*self.i = imagpart*
*
*
*x = Complex(3.0, -4.
On Sat, 23 Apr 2011 13:30:02 -0700, chad wrote:
> On Apr 22, 12:47 pm, Carl Banks wrote:
>> On Thursday, April 21, 2011 11:00:08 AM UTC-7, MRAB wrote:
>> > On 21/04/2011 18:12, Pascal J. Bourguignon wrote:
>> > > chad writes:
>>
>> > >> Let's say I have the following
>>
>> > >> class BaseHan
On Apr 22, 12:47 pm, Carl Banks wrote:
> On Thursday, April 21, 2011 11:00:08 AM UTC-7, MRAB wrote:
> > On 21/04/2011 18:12, Pascal J. Bourguignon wrote:
> > > chad writes:
>
> > >> Let's say I have the following
>
> > >> class BaseHandler:
> > >> def foo(self):
> > >> print "He
On Thursday, April 21, 2011 11:00:08 AM UTC-7, MRAB wrote:
> On 21/04/2011 18:12, Pascal J. Bourguignon wrote:
> > chad writes:
> >
> >> Let's say I have the following
> >>
> >> class BaseHandler:
> >> def foo(self):
> >> print "Hello"
> >>
> >> class HomeHandler(BaseHandler):
>
On Fri, Apr 22, 2011 at 7:49 AM, Kyle T. Jones
wrote:
>> You don't need to create an instance of BaseHandler. You have the
>> class, Python knows you have the class -- Python will look there if the
>> subclasses lack an attribute.
>>
>> ~Ethan~
>>
>
> Really? That's not at all how I thought it w
Kyle T. Jones wrote:
Ethan Furman wrote:
chad wrote:
Let's say I have the following
class BaseHandler:
def foo(self):
print "Hello"
class HomeHandler(BaseHandler):
pass
Then I do the following...
test = HomeHandler()
test.foo()
How can HomeHandler call foo() when I nev
Ethan Furman wrote:
chad wrote:
Let's say I have the following
class BaseHandler:
def foo(self):
print "Hello"
class HomeHandler(BaseHandler):
pass
Then I do the following...
test = HomeHandler()
test.foo()
How can HomeHandler call foo() when I never created an instance
MRAB wrote:
On 21/04/2011 18:12, Pascal J. Bourguignon wrote:
chad writes:
Let's say I have the following
class BaseHandler:
def foo(self):
print "Hello"
class HomeHandler(BaseHandler):
pass
Then I do the following...
test = HomeHandler()
test.foo()
How can HomeHa
On Thu, 21 Apr 2011 19:00:08 +0100, MRAB wrote:
>>> How can HomeHandler call foo() when I never created an instance of
>>> BaseHandler?
>>
>> But you created one!
>>
> No, he didn't, he created an instance of HomeHandler.
>
>> test is an instance of HomeHandler, which is a subclass of BaseHandler
chad wrote:
Let's say I have the following
class BaseHandler:
def foo(self):
print "Hello"
class HomeHandler(BaseHandler):
pass
Then I do the following...
test = HomeHandler()
test.foo()
How can HomeHandler call foo() when I never created an instance of
BaseHandler?
Yo
On 21/04/2011 18:12, Pascal J. Bourguignon wrote:
chad writes:
Let's say I have the following
class BaseHandler:
def foo(self):
print "Hello"
class HomeHandler(BaseHandler):
pass
Then I do the following...
test = HomeHandler()
test.foo()
How can HomeHandler call fo
On 4/21/2011 11:43 AM, chad wrote:
Let's say I have the following
class BaseHandler:
def foo(self):
print "Hello"
class HomeHandler(BaseHandler):
pass
Then I do the following...
test = HomeHandler()
test.foo()
How can HomeHandler call foo() when I never created an ins
chad writes:
> Let's say I have the following
>
> class BaseHandler:
> def foo(self):
> print "Hello"
>
> class HomeHandler(BaseHandler):
> pass
>
>
> Then I do the following...
>
> test = HomeHandler()
> test.foo()
>
> How can HomeHandler call foo() when I never created an in
On Apr 21, 2011 12:55 PM, "chad" wrote:
>
> On Apr 21, 9:30 am, Jean-Michel Pichavant
> wrote:
> > chad wrote:
> > > Let's say I have the following
> >
> > > class BaseHandler:
> > > def foo(self):
> > > print "Hello"
> >
> > > class HomeHandler(BaseHandler):
> > > pass
> >
>
On Apr 21, 9:30 am, Jean-Michel Pichavant
wrote:
> chad wrote:
> > Let's say I have the following
>
> > class BaseHandler:
> > def foo(self):
> > print "Hello"
>
> > class HomeHandler(BaseHandler):
> > pass
>
> > Then I do the following...
>
> > test = HomeHandler()
> > test.fo
chad wrote:
Let's say I have the following
class BaseHandler:
def foo(self):
print "Hello"
class HomeHandler(BaseHandler):
pass
Then I do the following...
test = HomeHandler()
test.foo()
How can HomeHandler call foo() when I never created an instance of
BaseHandler?
Cha
You did:
>>> class BaseHandler:
... def foo(self):
... print "Hello"
...
>>> class HomerHandler(BaseHandler):
... pass
...
>>> test = HomerHandler()
>>> test.foo()
Hello
>>> isinstance(test, BaseHandler)
True
>>> isinstance(test, HomerHandler)
True
>>>
You could say test is a
Let's say I have the following
class BaseHandler:
def foo(self):
print "Hello"
class HomeHandler(BaseHandler):
pass
Then I do the following...
test = HomeHandler()
test.foo()
How can HomeHandler call foo() when I never created an instance of
BaseHandler?
Chad
--
http://m
.
One task that I need to do is create a class in c++ that subclasses 3 python
classes and calls the base class constructor as super would call in python.
I need this in c++. How can I do this please?
class ABC(a,b,c):
def __init__(self, *args, **kwargs):
super(ABC, self).__init__(
Holden Web is pleased to announce three upcoming classes in New York
city the week of January 18.
Jan 18-20Introduction to Python (3 days) - Steve Holden
http://holdenweb.com/py/introclass/
Jan 21 .NET: IronPython from the Ground Up (1 day) - Michael Foord
http://holdenweb.com/py/ironpython/
Ok thanks I'll try remembering it.
On 8/28/07, Erik Jones <[EMAIL PROTECTED]> wrote:
>
> On Aug 28, 2007, at 12:04 AM, Lamonte Harris wrote:
>
> > How come you have to set the initialized created variables to equal
> > the parameters, shouldn't that be default?
> >
> > class testing:
> >
On Aug 28, 2007, at 12:04 AM, Lamonte Harris wrote:
> How come you have to set the initialized created variables to equal
> the parameters, shouldn't that be default?
>
> class testing:
> def __init__(self,testing):
>self.testing = testing
> x = testing("testing")
>
How come you have to set the initialized created variables to equal the
parameters, shouldn't that be default?
class testing:
def __init__(self,testing):
self.testing = testing
x = testing("testing")
print x.testing
How come self.testing = testing
Can someone explain
On 2007-06-20, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> On 2007-06-20, Alex Martelli <[EMAIL PROTECTED]> wrote:
>> Neil Cerutti <[EMAIL PROTECTED]> wrote:
>>> In C++ they are used most often for factory functions, since
>>> they conveniently have access to the class's private members,
>>> and don'
On 2007-06-20, Alex Martelli <[EMAIL PROTECTED]> wrote:
> Neil Cerutti <[EMAIL PROTECTED]> wrote:
>
>> In C++ they are used most often for factory functions, since they
>> conveniently have access to the class's private members, and
>> don't want or need an existing instance. Python seems to have
>
Neil Cerutti <[EMAIL PROTECTED]> wrote:
> In C++ they are used most often for factory functions, since they
> conveniently have access to the class's private members, and
> don't want or need an existing instance. Python seems to have
> adopted this use-case (ConfigParser, for example), but withou
On 2007-06-19, Bjoern Schliessmann
<[EMAIL PROTECTED]> wrote:
> Diez B. Roggisch wrote:
>> With other OOP languages you mean Java. Which does have static
>> methods because they lack the notion of a function by its own,
>> so the shoehorned them into their "everything is inside a
>> class"-paradigm
Bjoern Schliessmann wrote:
> Diez B. Roggisch wrote:
>
>> With other OOP languages you mean Java. Which does have static
>> methods because they lack the notion of a function by its own, so
>> the shoehorned them into their "everything is inside a
>> class"-paradigm.
>
> ACK, but doesn't C++ hav
Tom Gur a écrit :
>> Look for @staticmethod inhttp://docs.python.org/lib/built-in-funcs.html
>>
>> Example:
>> class C:
>> @staticmethod
>> def f(arg1, arg2, ...): ...
>
>
> Oops, sorry for the confusion - I've actually meant a static method,
> and Gerald's answer works fine.
FWIW, stati
Diez B. Roggisch wrote:
> With other OOP languages you mean Java. Which does have static
> methods because they lack the notion of a function by its own, so
> the shoehorned them into their "everything is inside a
> class"-paradigm.
ACK, but doesn't C++ have static methods too?
Regards,
Björn
Tom Gur wrote:
> Hi,
>
> I'm new to python, and I can't seem to find in the docs how to create
> the python equivalent of what's called in most OOP languages "static
> classes", can you give me a hint ?
With other OOP languages you mean Java. Which does have static methods
because they lack the
Tom Gur <[EMAIL PROTECTED]> writes:
> I'm new to python, and I can't seem to find in the docs how to
> create the python equivalent of what's called in most OOP languages
> "static classes", can you give me a hint ?
Can you give us a hint of what a "static class" would do? That is,
what features
> Look for @staticmethod inhttp://docs.python.org/lib/built-in-funcs.html
>
> Example:
> class C:
> @staticmethod
> def f(arg1, arg2, ...): ...
Oops, sorry for the confusion - I've actually meant a static method,
and Gerald's answer works fine.
Thanks alot
--
http://mail.python.org/mai
It's not clear what you mean here. If you mean something like static
inner classes in Java, then you can simply nest classes in Python:
>>> class A(object):
... class B(object):
... def aaa(self):
... print "AA"
...
>>> z = A.B()
>>> z.aaa()
AA
(In c
On Tue, 2007-06-19 at 12:00 +, Tom Gur wrote:
> Hi,
>
> I'm new to python, and I can't seem to find in the docs how to create
> the python equivalent of what's called in most OOP languages "static
> classes", can you give me a hint ?
If I had to guess, which apparently I have to because you'r
> > the python equivalent of what's called in most OOP languages "static
> > classes", can you give me a hint ?
>
> Look for @staticmethod inhttp://docs.python.org/lib/built-in-funcs.html
Woops... I misread...
--
Gerald Kaszuba
http://geraldkaszuba.com
--
http://mail.python.org/mailman/listinfo
On Jun 19, 10:00 pm, Tom Gur <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm new to python, and I can't seem to find in the docs how to create
> the python equivalent of what's called in most OOP languages "static
> classes", can you give me a hint ?
Look for @staticmethod in http://docs.python.org/lib/b
Hi,
I'm new to python, and I can't seem to find in the docs how to create
the python equivalent of what's called in most OOP languages "static
classes", can you give me a hint ?
--
http://mail.python.org/mailman/listinfo/python-list
John Nagle wrote:
> The Pascal/Ada/Modula family of languages all had type systems
> with restrictions on conversion. Unlike C, types in Pascal
> are not simply abbreviations of the type; they're unique types.
Ada is the only one of those that would let you
define things like "a new kind of
Paul Rubin wrote:
> Maybe we can concoct a cross between Python and Haskell, and call it
> "Paskell" after the philosopher Blaise ;-).
No, we name it after Pascall's confectionery:
http://www.homesick-kiwi.com/productpage.php?id=51
Lots of syntactic sugar. :-)
--
Greg
--
http://mail.python
Steven D'Aprano wrote:
> On Fri, 02 Mar 2007 09:30:20 +0100, Diez B. Roggisch wrote:
>
>
>>>A type system doesn't help. So what if they're both floats? The test
>>>is still bogus, your code will still wait too long to engage the
>>>retro-rockets, and the billion dollar space craft will still be t
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> Unless there is a type system that can automatically deal with the
> semantic difference between (say) screen coordinates and window
> coordinates, or between height and width, or safe and unsafe strings, the
> coder still has to deal with it themselves
On Thu, 01 Mar 2007 21:53:09 -0800, Paul Rubin wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>> > That still sounds like an unreliable manual type system,
>> It's unreliable in the sense that the coder has to follow the naming
>> convention, and must have some bare minimum of sense. If you
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> > Multi-Level-Specification allows you to
> > express physical quantities with their respective unit, and operations
> > on them to yield the combined unit at compile-time. There are some
> > rather complicated cases where simple unification won't so
On Fri, 02 Mar 2007 09:30:20 +0100, Diez B. Roggisch wrote:
>> A type system doesn't help. So what if they're both floats? The test
>> is still bogus, your code will still wait too long to engage the
>> retro-rockets, and the billion dollar space craft will still be travelling
>> at hundreds of mi
On Mar 2, 4:47 am, Steven D'Aprano <[EMAIL PROTECTED]>
wrote:
> On Thu, 01 Mar 2007 20:24:33 -0800, Paul Rubin wrote:
> > Steven D'Aprano <[EMAIL PROTECTED]> writes:
> >> But if you used Apps Hungarian, and saw this line of code:
>
> >> if hmmCurrentHeight <= hinCriticalHeight:
>
> >> then you shou
>
> if hmmCurrentHeight <= hinCriticalHeight:
> then you should instantly recognise that there's a problem.
all civilized nations but one use metric systems. Of course there is a
problem if you spot inches somewhere.
Harald
--
http://mail.python.org/mailman/listinfo/python-list
On 2 mar, 05:14, Steven D'Aprano <[EMAIL PROTECTED]>
wrote:
> On Thu, 01 Mar 2007 21:45:55 +0100, Bruno Desthuilliers wrote:
> > As a side note : hungarian notation is usually considered bad form here.
> > Look here for usual naming conventions:
> >http://www.python.org/dev/peps/pep-0008/
>
> Which
> A type system doesn't help. So what if they're both floats? The test
> is still bogus, your code will still wait too long to engage the
> retro-rockets, and the billion dollar space craft will still be travelling
> at hundreds of miles an hour when it reaches the surface of Mars.
A type system _
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> > That still sounds like an unreliable manual type system,
> It's unreliable in the sense that the coder has to follow the naming
> convention, and must have some bare minimum of sense. If your coders are
> morons, no naming convention will save you. (
Steven D'Aprano wrote:
> A type system doesn't help. So what if they're both floats? The test
> is still bogus, your code will still wait too long to engage the
> retro-rockets, and the billion dollar space craft will still be travelling
> at hundreds of miles an hour when it reaches the surface o
On Thu, 01 Mar 2007 20:24:33 -0800, Paul Rubin wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>> But if you used Apps Hungarian, and saw this line of code:
>>
>> if hmmCurrentHeight <= hinCriticalHeight:
>>
>> then you should instantly recognise that there's a problem. Comparing
>> a heigh
1 - 100 of 133 matches
Mail list logo