EuroPython 2020: Data Science Track

2020-07-22 Thread M.-A. Lemburg
We are excited to announce a complete two day data science track at
EuroPython 2020 Online, happening on Thursday and Friday (July 23 -
24).

Yes, that’s starting tomorrow. Sorry for the short notice :-)


  * Data Science @ EuroPython 2020 *

  https://ep2020.europython.eu/events/data-science/


The data science track is part of EuroPython 2020, so you won’t need
to buy an extra ticket to attend.

We will have a two day track featuring more than 20 keynotes,
full-length talks and posters:

- Keynotes in the Microsoft Room
- Talks in the Parrot Room
- Posters in the Poster Rooms

The full program is available on our data science page:

https://ep2020.europython.eu/events/data-science/

If you’d like to attend the data science track at EuroPython 2020,
please register for EuroPython 2020 soon.


Dates and Registration
--

EuroPython 2020 will be held online from July 23-26 2020. You can
register on our website:

https://ep2020.europython.eu/registration/buy-tickets/

If you want to learn more about the online setup, please check the
Setup section on our website:

https://ep2020.europython.eu/setup/online-conference/

After buying a ticket, please register on our Discord server,
following the instructions in the order confirmation email.

You will even be able to buy tickets on the days themselves, however,
please be aware that this may cause delays in your Discord signup.

Please see our website for more information.


Help spread the word


Please help us spread this message by sharing it on your social
networks as widely as possible. Thank you !

Link to the blog post:

https://blog.europython.eu/post/624331411913146368/europython-2020-data-science-track

Tweet:

https://twitter.com/europython/status/1285864453511294976

Thanks,
--
EuroPython 2020 Team
https://ep2020.europython.eu/
https://www.europython-society.org/

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: True is True / False is False?

2020-07-22 Thread Oscar Benjamin
On Wed, 22 Jul 2020 at 02:12, Chris Angelico  wrote:
>
> On Wed, Jul 22, 2020 at 11:04 AM Tim Chase
>  wrote:
> >
> > I know for ints, cpython caches something like -127 to 255 where `is`
> > works by happenstance based on the implementation but not the spec
> > (so I don't use `is` for comparison there because it's not
> > guaranteed by the language spec). On the other hand, I know that None
> > is a single object that can (and often *should*) be compared using
> > `is`. However I spent some time reading through the language specs and
> > didn't encounter anything about booleans returned from
> > comparisons-operators, guaranteeing that they always return The One
> > True and The One False.
...
>
> That said, though, a comparison isn't required to return a bool. If it
> *does* return a bool, it has to be one of those exact two, but it
> could return anything it chooses. But for built-in types and most
> user-defined types, you will indeed get a bool.

I'm not sure if this is relevant to the question but thought I'd
mention concrete examples. A numpy array will return non-bool for both
of the mentioned operators:


In [2]: import numpy as np

In [3]: a = np.array([2, 2, 2])

In [4]: a == a
Out[4]: array([ True,  True,  True])

In [5]: a > 4
Out[5]: array([False, False, False])


With sympy expressions == will strictly always return a bool but
inequality operators can return instances of Relational. When they can
be evaluated those will give sympy's Booleans rather than bool.


In [6]: import sympy as sym

In [7]: x = sym.Symbol('x')

In [8]: x > 0
Out[8]: x > 0

In [9]: type(_)
Out[9]: sympy.core.relational.StrictGreaterThan

In [10]: (x > 0).subs(x, 2)
Out[10]: True

In [11]: type(_)
Out[11]: sympy.logic.boolalg.BooleanTrue


--
Oscar
-- 
https://mail.python.org/mailman/listinfo/python-list


Spam, bacon, sausage and Spam (was: EuroPython 2020: Data Science Track)

2020-07-22 Thread Christian Heimes
Hi MAL,

would it be possible to reduce the amount of EuroPython spam on
@python.org mailing lists to a sensible level? This mailing list is a
general discussion list for the Python programming language. It's not a
conference advertisement list.

Something between 1 to 3 mails per conference and year (!) sounds
sensible to me. You have posted 21 new threads about EP 2020 since
January on this list, thereof 5 threads this month. In comparison I
could only find two ads for other conferences in the last 12 month
(FlaskCon, PyCon TZ).

Christian

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Upgrade from Python 3.6 to 3.8 and cx-freeze is not available more

2020-07-22 Thread Souvik Dutta
Py2exe might help in making .exe files

On Tue, Jul 21, 2020, 11:42 PM Christian SCHEIBER / KLS GmbH <
[email protected]> wrote:

>
>
> I’d like to do exe files, so the pythin interpreter has not tob e
> installed.
>
> That’s why I use cx-freeze, but installing Python 3.8 after using Python
> 3.6
> does not work.
>
>
>
> Can you tell me how I can make cx-freeze in Python 3.8 or how I can produce
> exe files for Windows 7 32 / 64 Bit and Win10?
>
> Thanx in advance
>
>
>
>
>
> Mit freundlichen Grüßen
>
>
>
> Christian Scheiber
>
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Installing Python 3.8.3 with tkinter

2020-07-22 Thread Klaus Jantzen

Hi,

Trying to install Python 3.8.3 with tkinter I run configure with the 
following options


./configure --enable-optimizations --with-ssl-default-suites=openssl 
--with-openssl=/usr/local --enable-loadable-sqlite-extensions 
--with-pydebug --with-tcltk-libs='-L/opt/ActiveTcl-8.6/lib/tcl8.6' 
--with-tcltk-includes='-I/opt/ActiveTcl-8.6/include'


Running Python gives the following information

Python 3.8.3 (default, Jul 22 2020, 11:52:15)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> import tkinter
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python3.8/tkinter/__init__.py", line 36, in 
    import _tkinter # If this fails your Python may not be configured 
for Tk

ModuleNotFoundError: No module named '_tkinter'
>>>

Obviously there is something wrong with my configure options.

How do that correctly?

Thanks for any help.

K.D.J.


--
https://mail.python.org/mailman/listinfo/python-list


Re: Python Program Help

2020-07-22 Thread Elias Fotinis

On 21/07/2020 22:25, Terry Reedy wrote:
The only way I discovered to get that error, on Windows, is to hit 
control-D in response to the prompt.


Slight correction: On Windows, EOF is signaled with Ctrl-Z. This is the 
same as hitting F6 in the legacy console (can't check with Win10 at the 
moment, but I believe it's the same there).


Ctrl-D (the Unixy EOF) is returned simply as '\x04' on Windows.

--
https://mail.python.org/mailman/listinfo/python-list


Re: True is True / False is False?

2020-07-22 Thread Tim Chase
On 2020-07-22 11:54, Oscar Benjamin wrote:
>> On Wed, Jul 22, 2020 at 11:04 AM Tim Chase wrote:  
>>> reading through the language specs and didn't encounter
>>> anything about booleans returned from comparisons-operators,
>>> guaranteeing that they always return The One True and The One
>>> False.  
>>
>> That said, though, a comparison isn't required to return a bool.
>> If it *does* return a bool, it has to be one of those exact two,
>> but it could return anything it chooses. But for built-in types
>> and most user-defined types, you will indeed get a bool.  
> 
> I'm not sure if this is relevant to the question but thought I'd
> mention concrete examples. A numpy array will return non-bool for
> both of the mentioned operators

that is indeed a helpful data-point.  Do you know of any similar
example in the standard library of things where comparison-operators
return something other than True or False (or None)?

Thanks,

-tkc


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: True is True / False is False?

2020-07-22 Thread Chris Angelico
On Thu, Jul 23, 2020 at 5:51 AM Tim Chase  wrote:
>
> On 2020-07-22 11:54, Oscar Benjamin wrote:
> >> On Wed, Jul 22, 2020 at 11:04 AM Tim Chase wrote:
> >>> reading through the language specs and didn't encounter
> >>> anything about booleans returned from comparisons-operators,
> >>> guaranteeing that they always return The One True and The One
> >>> False.
> >>
> >> That said, though, a comparison isn't required to return a bool.
> >> If it *does* return a bool, it has to be one of those exact two,
> >> but it could return anything it chooses. But for built-in types
> >> and most user-defined types, you will indeed get a bool.
> >
> > I'm not sure if this is relevant to the question but thought I'd
> > mention concrete examples. A numpy array will return non-bool for
> > both of the mentioned operators
>
> that is indeed a helpful data-point.  Do you know of any similar
> example in the standard library of things where comparison-operators
> return something other than True or False (or None)?
>

Can't think of any (although that doesn't disprove it). Also, nothing
returns None from a comparison, to my knowledge.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Fwd: [BUG] missing ')' causes syntax error on next line

2020-07-22 Thread Jeff Linahan
-- Forwarded message -
From: Jeff Linahan 
Date: Wed, Jul 22, 2020, 5:23 PM
Subject: Fwd: [BUG] missing ')' causes syntax error on next line
To: 


Subscribing to the mailing list as per the bot's request and resending.

-- Forwarded message -
From: Jeff Linahan 
Date: Wed, Jul 22, 2020, 5:20 PM
Subject: [BUG] missing ')' causes syntax error on next line
To: 


See attached image.  Would be nice if it printed "SyntaxError: unbalanced
parens" as it can difficult to see the problem if code like this is run in
an environment that only prints the problematic line, which in this case
the compiler is confused and one line off.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Installing Python 3.8.3 with tkinter

2020-07-22 Thread Ned Deily
On 2020-07-22 06:20, Klaus Jantzen wrote:
> Trying to install Python 3.8.3 with tkinter I run configure with the
> following options
> 
> ./configure --enable-optimizations --with-ssl-default-suites=openssl
> --with-openssl=/usr/local --enable-loadable-sqlite-extensions
> --with-pydebug --with-tcltk-libs='-L/opt/ActiveTcl-8.6/lib/tcl8.6'
> --with-tcltk-includes='-I/opt/ActiveTcl-8.6/include'
> 
> Running Python gives the following information
[...]
> How do that correctly?

Try --with-tcltk-libs='-L/opt/ActiveTcl-8.6/lib -ltcl8.6 -ltk8.6'


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [BUG] missing ')' causes syntax error on next line

2020-07-22 Thread Chris Angelico
On Thu, Jul 23, 2020 at 8:30 AM Jeff Linahan  wrote:
>
> -- Forwarded message -
> From: Jeff Linahan 
> Date: Wed, Jul 22, 2020, 5:23 PM
> Subject: Fwd: [BUG] missing ')' causes syntax error on next line
> To: 
>
>
> Subscribing to the mailing list as per the bot's request and resending.
>
> -- Forwarded message -
> From: Jeff Linahan 
> Date: Wed, Jul 22, 2020, 5:20 PM
> Subject: [BUG] missing ')' causes syntax error on next line
> To: 
>
>
> See attached image.  Would be nice if it printed "SyntaxError: unbalanced
> parens" as it can difficult to see the problem if code like this is run in
> an environment that only prints the problematic line, which in this case
> the compiler is confused and one line off.

The image doesn't get attached. Use text in future.

Thing is, the syntax error isn't the unbalanced parenthesis, because
you can quite happily span multiple lines:

x = func(
a,
b,
c,
)

But if you have a keyword inside there, it won't work:

x = func(
a,
b,
def foo(): pass

The parser can't figure out which one is wrong, so it simply reports
the error at the point where it finds it. As a general rule, if you're
pointed to a line that looks fine, try looking above it. (And that's
not just for Python - many many programming languages exhibit this
same behaviour, for the same reason.)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fwd: [BUG] missing ')' causes syntax error on next line

2020-07-22 Thread Ethan Furman

On 7/22/20 2:57 PM, Jeff Linahan wrote:


Subscribing to the mailing list as per the bot's request and resending.


*beep* *whir*

WE ARE NOT

*click* *whi*

A BOT.

*bzzzt*

WE ARE

*bzzzt* *click*

ADVANCED LIFE

*whi*

FORMS

*click*

*beep*

.

--
~eTHAN~
pYTHON lIST mODERATOR
NoT a BoT  (i ThInK...)
--
https://mail.python.org/mailman/listinfo/python-list


Re: Fwd: [BUG] missing ')' causes syntax error on next line

2020-07-22 Thread Joe Pfeiffer
Jeff Linahan  writes:
>
> See attached image.  Would be nice if it printed "SyntaxError: unbalanced
> parens" as it can difficult to see the problem if code like this is run in
> an environment that only prints the problematic line, which in this case
> the compiler is confused and one line off.

It would be indeed be nice, but it's reporting the error when it finds
it.  Suppose you were typing the program in at the console -- how could
it possibly go back and report the error on the previous line?  Given
python's syntax, does the error even really exist yet on that
previous line?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fwd: [BUG] missing ')' causes syntax error on next line

2020-07-22 Thread Kyle Stanley
>
> *beep* *whir*
>
> WE ARE NOT
>
> *click* *whi*
>
> A BOT.


*dial up noises*

SPEAK FOR YOURSELF


On Wed, Jul 22, 2020 at 6:46 PM Ethan Furman  wrote:

> On 7/22/20 2:57 PM, Jeff Linahan wrote:
>
> > Subscribing to the mailing list as per the bot's request and resending.
>
> *beep* *whir*
>
> WE ARE NOT
>
> *click* *whi*
>
> A BOT.
>
> *bzzzt*
>
> WE ARE
>
> *bzzzt* *click*
>
> ADVANCED LIFE
>
> *whi*
>
> FORMS
>
> *click*
>
> *beep*
>
> .
>
> --
> ~eTHAN~
> pYTHON lIST mODERATOR
> NoT a BoT  (i ThInK...)
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [BUG] missing ')' causes syntax error on next line

2020-07-22 Thread dn via Python-list

On 23/07/2020 10:33, Chris Angelico wrote:

-- Forwarded message -
From: Jeff Linahan 



See attached image.  Would be nice if it printed "SyntaxError: unbalanced
parens" as it can difficult to see the problem if code like this is run in
an environment that only prints the problematic line, which in this case
the compiler is confused and one line off.


Thing is, the syntax error isn't the unbalanced parenthesis, because
you can quite happily span multiple lines:



But if you have a keyword inside there, it won't work:



The parser can't figure out which one is wrong, so it simply reports
the error at the point where it finds it. As a general rule, if you're
pointed to a line that looks fine, try looking above it. (And that's
not just for Python - many many programming languages exhibit this
same behaviour, for the same reason.)



This may change when the new PEG-parser brings us Python 3.9 
(https://www.python.org/dev/peps/pep-0617/)


I'm looking forward to seeing how this change will impact/improve the 
quality of feedback/traces/err.msgs...



OP: you may be interested in SuperHELP - Help for Humans!
https://github.com/grantps/superhelp
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: Fwd: [BUG] missing ')' causes syntax error on next line

2020-07-22 Thread dn via Python-list

On 23/07/2020 10:46, Ethan Furman wrote:

On 7/22/20 2:57 PM, Jeff Linahan wrote:


Subscribing to the mailing list as per the bot's request and resending.


*beep* *whir*

WE ARE NOT

*click* *whi*

A BOT.

*bzzzt*

WE ARE

*bzzzt* *click*

ADVANCED LIFE

*whi*

FORMS

*click*

*beep*

.

--
~eTHAN~
pYTHON lIST mODERATOR
NoT a BoT  (i ThInK...)



Enjoyed the joke!
(and thanks for all the efforts you exert on our behalf)


However, questions remain:-

Robot: any machine or mechanical device that operates automatically with 
humanlike skill


See also, Turing Machine 
(https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/turing-machine/one.html)

--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: Fwd: [BUG] missing ')' causes syntax error on next line

2020-07-22 Thread Chris Angelico
On Thu, Jul 23, 2020 at 9:17 AM dn via Python-list
 wrote:
> However, questions remain:-
>
> Robot: any machine or mechanical device that operates automatically with
> humanlike skill
>

What about a human that operates mechanically with merely robot-like
skill? I'm pretty sure I've spoken to them on the phone many times.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Spam, bacon, sausage and Spam (was: EuroPython 2020: Data Science Track)

2020-07-22 Thread Cameron Simpson
On 22Jul2020 15:00, Christian Heimes  wrote:
>Hi MAL,
>
>would it be possible to reduce the amount of EuroPython spam on
>@python.org mailing lists to a sensible level? This mailing list is a
>general discussion list for the Python programming language. It's not a
>conference advertisement list.
>
>Something between 1 to 3 mails per conference and year (!) sounds
>sensible to me. [...]

I, OTOH, am unperturbed.

Things have been much in flux this year, and a last minute short notice 
thing like this post needs wide dissemination. Normally a conference 
needs few posts, but this year everything is different and plans have 
changed a lot, on the fly.

I have never attended EuroPython and probably never will (I'm on the 
other side of the planet) but I'm still interested. Rather than 
subscribe to every conference thing, getting them here is very 
convenient.

As with all posters and topics, a truly annoying one can always be 
blocked at your personal discretion with a filter rule, eg to discard 
"europython". I know that advice verges on the spammers' claim that "you 
can always opt out" but for me this stuff isn't spam.

Cheers,
Cameron Simpson  (formerly [email protected])
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fwd: [BUG] missing ')' causes syntax error on next line

2020-07-22 Thread dn via Python-list

On 23/07/2020 11:51, Chris Angelico wrote:

On Thu, Jul 23, 2020 at 9:17 AM dn via Python-list
 wrote:

However, questions remain:-

Robot: any machine or mechanical device that operates automatically with
humanlike skill



What about a human that operates mechanically with merely robot-like
skill? I'm pretty sure I've spoken to them on the phone many times.

Can't say - I've never tried to speak with @Ethan over the phone.

...and what do you call the robot which can't/won't operate by phone, 
and takes a week to respond to your email - and then often by asking for 
information previously provided, eg a certain book-seller's "Mr Neil 
would you please confirm that your voucher number is 12345?"



However, on the Turing machine side, I recall creating an abbreviated 
version for a University Open Day - way back in the seventies and when 
VDU-terminals were a novelty and thus curiosities.


The program worked in similar manner to the famous "Eliza" 
(https://en.wikipedia.org/wiki/ELIZA) - attempting to give an illusion 
of understanding and conversation. It stored a mere top-twenty phrases. 
When the user entered some text, it would randomly select one of these 
and 'reply'. The user was invited to give feedback, ie whether it was a 
good reply or not. These were used to score/grade the phrases. Then the 
user's data-entry was added to the 'database of phrases' in place of the 
existing phrase with the lowest score. Thus the conversation continued.


'On the day', many of our visitors were convinced that either the 
computer was capable of holding a conversation (à la Turing), or that 
there was a person hidden-away somewhere, providing the 'answers'.


Most telling, reviewing the 'database' at the end, showed twenty of the 
most innocuous phrases in English conversation - those which were so 
multi-purpose that they could be used in almost any situation (phatic 
phrases: https://en.wikipedia.org/wiki/Phatic_expression).


You be sure to have a nice day, now!
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: Fwd: [BUG] missing ')' causes syntax error on next line

2020-07-22 Thread Gene Heskett
On Wednesday 22 July 2020 19:51:42 Chris Angelico wrote:

> On Thu, Jul 23, 2020 at 9:17 AM dn via Python-list
>
>  wrote:
> > However, questions remain:-
> >
> > Robot: any machine or mechanical device that operates automatically
> > with humanlike skill
>
> What about a human that operates mechanically with merely robot-like
> skill? I'm pretty sure I've spoken to them on the phone many times.
>
> ChrisA

Thats more common than you might think Chris.  Whats nice is that you can 
often take over that robot and use his or her hands to troubleshoot an 
off the air tv transmitter from a thousand miles away.  That was my 
field of expertise for 60 years.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fwd: [BUG] missing ')' causes syntax error on next line

2020-07-22 Thread Chris Angelico
On Thu, Jul 23, 2020 at 10:30 AM Gene Heskett  wrote:
>
> On Wednesday 22 July 2020 19:51:42 Chris Angelico wrote:
>
> > On Thu, Jul 23, 2020 at 9:17 AM dn via Python-list
> >
> >  wrote:
> > > However, questions remain:-
> > >
> > > Robot: any machine or mechanical device that operates automatically
> > > with humanlike skill
> >
> > What about a human that operates mechanically with merely robot-like
> > skill? I'm pretty sure I've spoken to them on the phone many times.
> >
> > ChrisA
>
> Thats more common than you might think Chris.  Whats nice is that you can
> often take over that robot and use his or her hands to troubleshoot an
> off the air tv transmitter from a thousand miles away.  That was my
> field of expertise for 60 years.
>

Ah yes. I was more thinking of the ones you get when you call for
support. "Have you rebooted your computer and router?" "THERE IS NO
ADSL SYNC. Rebooting my computer is not going to change that."

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Installing Python 3.8.3 with tkinter

2020-07-22 Thread Klaus Jantzen

On 7/22/20 11:05 PM, Ned Deily wrote:

On 2020-07-22 06:20, Klaus Jantzen wrote:

Trying to install Python 3.8.3 with tkinter I run configure with the
following options

./configure --enable-optimizations --with-ssl-default-suites=openssl
--with-openssl=/usr/local --enable-loadable-sqlite-extensions
--with-pydebug --with-tcltk-libs='-L/opt/ActiveTcl-8.6/lib/tcl8.6'
--with-tcltk-includes='-I/opt/ActiveTcl-8.6/include'

Running Python gives the following information

[...]

How do that correctly?

Try --with-tcltk-libs='-L/opt/ActiveTcl-8.6/lib -ltcl8.6 -ltk8.6'



Thank you for your suggestion; unfortunately it did not help.

--
https://mail.python.org/mailman/listinfo/python-list


Re: Friday Finking: Limiting parameters

2020-07-22 Thread dn via Python-list

On 22/07/2020 05:37, Peter J. Holzer wrote:

On 2020-07-13 17:21:40 +1200, dn via Python-list wrote:

On 12/07/20 10:10 PM, Barry Scott wrote:

I'd expect to see something like this:

def mail_label( person, address ):
first_name = person.first_name
# or if you want a function interface
first_line_of_address = address.get_first_line()


Does this idea move whole objects across the interface? (see earlier in the
thread)


Assigning an object in Python only copies a pointer (and may adjust some
house-keeping info, like a reference count). So it doesn't matter
whether the object  has 5 fields or 50. The function will only access
those it knows about and ignore the rest.


Yes, poor choice of words in "move". Perhaps (he says rather weakly), 
think in terms of move-ing control - from the object to the function. Is 
this the best idea?


The point being that the function needs to 'know things' about the 
object, ie 'I want to make the identification line of the address so I 
must retrieve title, first-initial, family-name, ... all names which 
exist inside the object. In our example, the example-object has been 
person, so it's not big deal. What happens if in-future we develop a 
mailing-list for companies? The mail-label function now appears to be 
requiring that the company object use exactly the same attribute-names 
as person!


The obvious alternative might be to pass all three data-values (in the 
example). Now the function only needs to know what it intends to call 
the three parameters - nothing more. However, our argument-count 
increases again...


Another alternative would be to pass a method which will retrieve those 
fields from the object, delivering them in the form[at] expected by the 
function. In this case, the object provides the interface and the 
mail-label routine can get-on with what it knows best, without needing 
to know the who/what/where/how of data held by 'whatever is out-there'. 
(also, counts as only one argument!)




One might argue that mail_label should be a method of the person object
because it depends on the person (e.g., depending on the ethnicity of
the person the name might be written "first_name last_name" or
"last_name firstname"). OTOH a person may have many addresses (and an
address shared by many people), so a function which combines a person
and address (which therefore can't be a method of either person or
address) may be better.

Maybe that should be treated as a model-view relationship: You have two
models (person and address) and a view (which combines some aspects of
both while ignoring others).


So, would this be merely "has-a" composition, or is it where other 
languages would use "interfaces"? (and if-so, what is the pythonic 
solution?)

--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list