<html><head></head><body>Nimrod has that feature, too, which makes type lists easier on the eyes.<br><br><div class="gmail_quote">Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Nicholas Cole wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> On Sun, Aug 17, 2014 at 3:08 AM, Steven D'Aprano <steve@pearwood.info> wrote:<br /> <br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> def __init__(self,<br /> description:str, sec_code:str,<br /> vendor_name:str, vendor_inv_num:str,<br /> vendor_rtng:str, vendor_acct:str,<br /> transaction_code:str, vendor_acct_type:str,<br /> amount:int, payment_date:Any)->None:<br /></blockquote><br />I had to stare at that block of<br /> code for a long time to see how many and what type of arguments it<br /> called.<br /></blockquote><br />Pascal's function signature syntax had a nice feature<br />that everyone else seems to have forgotten about. If you<br />had multiple parameters of the same
type, you only had<br />to write the type once:<br /><br /> procedure Init(description, sec_code, vendor_name,<br /> vendor_inv_num, vendor_rtng, vendor_acct,<br /> transaction_code, vendor_acct_type, amount: str;<br /> payment_date: Any)<br /><br />Disappointingly, Python's annotations make the same<br />blunder as C, and most other languages since, in<br />requiring each parameter to have its own individual<br />annotation.<br /></pre></blockquote></div><br>
-- <br>
Sent from my Android phone with K-9 Mail. Please excuse my brevity.</body></html>