On 7/12/19 11:39 AM, Alan Gauld via Tutor wrote:
> On 12/07/2019 15:24, Gursimran Maken wrote:
>
>> Can someone please explain me the reason for below output.
>
> You've been bitten by one of the most common gotchas in Python :-)
>
>> def fun(n,li = [
,[7,8,9])
> fun(5) # reason for output (why am I getting to values in this output.)
>
> Output:
> [[0, 1, 2, 3, 4]]
> [7, 8, 9, [0, 1, 2, 3, 4]]
> [7, 8, 9, [0, 1, 2, 3, 4]]
> [[0, 1, 2, 3, 4], [0, 1, 2, 3, 4]]
>
> Thank you,
> Gursimran
> _
or of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
_______
Tutor maillist - Tutor@python.org
To unsubscribe or chan
, 1, 2, 3, 4]]
[7, 8, 9, [0, 1, 2, 3, 4]]
[[0, 1, 2, 3, 4], [0, 1, 2, 3, 4]]
Thank you,
Gursimran
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
ENGLAND
E-Mail: sydney.shall
(Correspondents outside the College should add @KCL.AC.UK)
TEL: +44 (0)208 48 59 01
From: Mike Barnett
Sent: 11 July 2019 16:40
To: Shall, Sydney
Cc: tutor@python.org
Subject: RE: [Tutor] Multiprocessing with many input input parameters
my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
setitem__, __delitem__), and check if the argument is a slice to
handle slices.
--
Richard Damon
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
ne_item = ['item one',]
@mike
-Original Message-
From: Shall, Sydney
Sent: Wednesday, July 10, 2019 11:44 AM
To: tutor@python.org
Subject: [Tutor] Multiprocessing with many input input parameters
I am using MAC OS X 10.14.5 on a MAC iBook I use Python 3.7.0 from Anaconda,
with Spyder 3.
print("Error")
print("Edge array: ", edgearray)# display the array results
arraysize = len(edgearray)# ends up being about twice the size
of the .csv version
print("Size of edagearray: ", arraysize)# show the size of the
arr
sday, July 10, 2019 11:44 AM
To: tutor@python.org
Subject: [Tutor] Multiprocessing with many input input parameters
I am using MAC OS X 10.14.5 on a MAC iBook I use Python 3.7.0 from Anaconda,
with Spyder 3.3.3
I am a relative beginner.
My program models cell reproduction. I have written
ext node" is then available as index + 1.
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
son
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
val) + '> '
tmp = tmp.next
return s[:-2]
ll = LinkedList()
[ll.prepend(x) for x in range(14,-1,-1)]
>>> ll
0> 1> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14
--- We not only inherit the Earth from our Ancestors, we borr
ENGLAND
E-Mail: sydney.shall
(Correspondents outside the College should add @KCL.AC.UK)
TEL: +44 (0)208 48 59 01
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
n 0;
}
Why does this code only print the result(array([ 1., 1., 1., 1., 1.]))
once, when I am calling the python code twice?
Please advise,
Jesse Ibarra
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On Tue, 9 Jul 2019 at 03:13, Alan Gauld via Tutor wrote:
> On 08/07/2019 15:14, Ibarra, Jesse wrote:
> >
> > I cannot seem to figure this potential bug out.
>
> Neither can we since we cannot see any code.
I'm guessing this might be the original post:
https://mail.python.or
Data = [
['2019-01-19','Fred Flintstone',23],
['2019-02-01','Scooby doo', 99]
]
Warning 3: age is not a fundamental attribute; it is a computed value!
--
Bob Gailer
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription
On 8/07/19 10:54 AM, Alan Gauld via Tutor wrote:
On 07/07/2019 20:54, David L Neil wrote:
(However, some of us grew-up at a time when RAM was expensive and even
in our relaxed state, such 'costs' still impinge on our consciousness -
Indeed, my first computer was at the local university
tos
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
int the result(array([ 1., 1., 1., 1., 1.]))
> once, when I am calling the python code twice?
You're on a mailing list about Python documentation, not embedding support.
Have you tried https://mail.python.org/mailman/listinfo/tutor?
Bests,
--
Julien Palard
https://
Bug
Hi
> Is this ticket still unsolved?
I do not have a CentOS to try it. You can try on
https://mail.python.org/mailman/listinfo/tutor list maybe, and if you resolve
your issue and it happen to be documentation related, don't hesitate to let the
docs@ list know.
Bests,
--
Julien Palard
ht
re easier (or as easy)
in native Python.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
_______
Tutor maillist
On 8/07/19 2:48 AM, Alan Gauld via Tutor wrote:
On 07/07/2019 09:19, David L Neil wrote:
First-off, it has to be said that "100's of elements" suggests using an
RDBMS - particularly if 'age' (eg 23 and 99) is not the only likely
selection mechanism.
Multiple selection mechanisms mig
to Fred's age,
you could end up with Data[0][2]. That would be pretty ugly, and
worse, hard to remember what it meant. Try to seek ways you can give
meaningful names to things. We can make suggestions if that's of
interest (I don't want to belabor the point).
__
ite
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail
ents:
under_50 = [ 23 ]
over_50 = [ 99 ]
However, this would require that only one character be listed at a given
age (dict keys must be unique), so another key might be a better choice!
Another data structure you might consider is a "linked list".
--
Regards =dn
______
identify the 2nd person. When we run it, it is
> not even showing an error. I need someone to look at it and let me know me
> the issue. I can share the source code.
>
> Thank you!
>
> Best regards,
> Rashmi
> ___
> Tu
m web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://
roblem then you must
explicitly create a copy. But the behaviour that you apparently
want is the default.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
____
person. When we run it, it is
not even showing an error. I need someone to look at it and let me know me
the issue. I can share the source code.
Thank you!
Best regards,
Rashmi
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription
?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
om/photos/alangauldphotos
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
05/07/19 19:57, Mats Wichmann wrote:
> > On 7/4/19 3:53 PM, Alan Gauld via Tutor wrote:
> >
> >>> Does this means that the Dict is ordered? or it is implementation
> dependent?
> >> Neither, it means the items in a list always have indexes
> >> starti
Thanks Alan and Mats for the explanation.
On 05/07/19 19:57, Mats Wichmann wrote:
On 7/4/19 3:53 PM, Alan Gauld via Tutor wrote:
Does this means that the Dict is ordered? or it is implementation dependent?
Neither, it means the items in a list always have indexes
starting at zero.
By pure
On 7/4/19 3:53 PM, Alan Gauld via Tutor wrote:
>> Does this means that the Dict is ordered? or it is implementation dependent?
>
> Neither, it means the items in a list always have indexes
> starting at zero.
>
> By pure coincidence dictionaries in recent Python version
e.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
']):
VenID = z
VenLat = df['latitude'][z]
VenLon = df['longitude'][z]
dist = distanceCalculator(newLat,newLon,VenLat,VenLon)
Data.loc[i,"Trainer"] = newName
Data.loc[i,"Distance"] = dist
Data.loc[i,"Subjects"] = newSub
Data.loc[i,"Location"] = newLoc
copyDfSub.drop(Id,inplace=True)
copyDfSub.reset_index(drop=True,inplace=True)
df5 = pd.merge(Data,DataTeacher,on="Venue",how='inner')
df5.to_csv("trainingData.csv")___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
alue)
This gives a output as always:-
0 Green G
1 Red R
2 Blue B
Does this means that the Dict is ordered? or it is implementation dependent?
Thanks & Regards,
Animesh.
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
ore O(n). Thoughts?
Try timing it?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
or 3 units in length, does the time complexity of Timsort
become O(n)? I was thinking that the insertion-sort portion of Timsort
would be able to sort a list of length=3 (such as [8,7,9] or [9,8,7]) in
O(3) time, therefore O(n). Thoughts?
___
Tutor
ds good. One suggestion - a sort of general programming suggestion
really - whenever you take user input, do some kind of validation on it
before using it. The context may not be one where anything malicious
could happen, but still, just to catch errors.
_______
"Connection SQLite":{{
"database": "{fdb.as_posix()}",
"encoding": "utf-8",
"type": "sqlite"
}}
}},
"default": "Connection SQLite"
}}'''
)
# TODO set up fossil in the fp dir
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
happens you can write code to determine if the cursor fell
within either card's known coordinate space.
Hope this gives you some idea of how to tackle your problem.
--
boB
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscr
Ingo
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
c:\test\this\path\
>>> print(b)
c:\test\this\path\
>>> print(wa)
c:\test\this\path
>>> print(wb)
c:\test\this\path
>>> print(pa)
c:\test\this\path\
>>> print(pb)
c:\test\this\path\
>>> print(ppa)
c:\/test/this/path
>>> print(ppb)
c:\/test
thon will interpret the backslash sequences.
> \t means tab, which is why the the results look mangled.
>
> inp = "c:\test\drive\this"
>
>
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
g because otherwise Python will interpret the backslash sequences.
\t means tab, which is why the the results look mangled.
inp = "c:\test\drive\this"
If you're going to use pathlib, then may as well use the / operator for
joining,
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
s know what kind of computer and operating system you
are using.
At the python. Org website you will find links to tutorials. Try some of
these out.
Direct future emails to tutor@python.org.
Always reply all so a copy goes back to the list.
___
Tutor ma
even better if it's not terribly complicated paste it into
the reply. be sure to reply all so everyone on the tutor list will see your
reply.
> There are no viruses.
That's kind of like a Salesman saying "trust me".
Bob Gailer
_______
Tut
;> inp
'c:\test\\drive\this'
>>> import os
>>> print(os.path.normpath(inp))
c: est\drive his
>>> print(pathlib.Path(inp))
c: est\drive his
>>>
how to go from a string to a path, how to append to a path (os.path.join
or / with Path), how to turn it into 'posix'
TutorInvercargill
http://tutorinvercargill.co.nz
Daves Web Designs
Website http://www.daveswebdesigns.co.nz
Email merrick...@gmail.com
Ph 03 216 2053
Cell 027 3089 169
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options
):
print('Card One is Selected')
return
Any suggestions are welcome
--
Dave Merrick
TutorInvercargill
http://tutorinvercargill.co.nz
Daves Web Designs
Website http://www.daveswebdesigns.co.nz
Email merrick...@gmail.com
Ph 03 216 2053
Cell 027 3089 169
___
Ooops, forgot to 'reply all'
-- Forwarded message --
From: Albert-Jan Roskam
Date: 28 Jun 2019 21:31
Subject: Re: [Tutor] Unexpected result when running flask application.
To: Cameron Simpson
Cc:
On 20 Jun 2019 00:56, Cameron Simpson wrote:
On 19Jun2019 09:54, Alan Gauld
ts a value, then calls the child
> script; then sets a different value, then calls the child script.
>
> === parent.py ===
> import os
> import subprocess
>
> print("Calling with MYENV_foo set")
> os.environ['MYENV_foo'] = "Yes"
> subprocess.run(["python
pected to run under Python 2; in Python 3 all classes are new-style
and you don't need to inherit from object to get that - and if you run a
code checker on your program in a Python 3 context, it will likely tell
you so.
___
Tutor maillist - Tutor@python
"child.py"])
print("Calling with MYENV_bar set")
os.environ['MYENV_bar'] = "1"
subprocess.run(["python", "child.py"])
==
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
t;How do you know I'm Mad?" asked Alice.
"You must be," said the Cat, "or you wouldn't have come here."
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
uthor/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
):
if newNode.name != self.name
self.children.append(newNode)
newNode.parent = self
myNode.add_child(Node(name, value))
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org
n't
really help.
--
Mayo Adams
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On 27/06/2019 22:20, Brave Heart via Tutor wrote:
> I would like python to write to DB so I can from DB write on a webpage with
> PHP...
Yes, that's easy enough. Python supports access to many databases,
do you have one in mind? If not the SQLite module that comes in
the standard l
you'd need an SQLite library for PHP, but I cannot
believe that one does not exist. (Or you could also write your web
application in Python instead of PHP.)
Cheers,
Cameron Simpson
___
Tutor maillist - Tutor@python.org
To unsubscribe or change su
On 6/27/19 3:20 PM, Brave Heart via Tutor wrote:
> I have a little RSS program , I current the out are basically outputted on my
> screen, but I would like python to write to DB so I can from DB write on a
> webpage with PHP...
>
> Kinda like I want to run a news website ..
The
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On 27/06/2019 00:07, Brick Howse via Tutor wrote:
> Hello all,
>
> New to programming and I noticed the range command did not function like it
> does in the tutorial.
> For example,
> I type
>>>>> range(5, 10)
> And the output is
> range(5, 10)
You
On 6/26/19 5:07 PM, Brick Howse via Tutor wrote:
> Hello all,
>
> New to programming and I noticed the range command did not function like it
> does in the tutorial.
> For example,
> I type
>>>>> range(5, 10)
> And the output is
> range(5, 10)
>
>
depending on what data structure is
used to arrange the data, because some actions are cheap in some
structures and expensive in others, so you choose the efficient action
where possible.
Cheers,
Cameron Simpson
_______
Tutor maillist - Tutor@py
windows 10
Python 3.7.3
Any suggestions is greatly appreciated.
Thank you in advance.
Derek
Sent from my iPhone
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
ules. It's a very rare problem that needs
a traditional data structure in Python.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
_______
On 6/26/19 11:59 AM, William Ray Wing via Tutor wrote:
> One of the most useful (to me) structures is the double-ended queue ("from
> collections import deque”). It creates a queue that can quickly remove an
> item from one end and add an item to the other. Parti
y useful for displaying
a sliding window into time series data, or a moving track of the most recent n
observations of a physical measurement.
Bill
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
index for a database?
I believe the "classic" use case is memory management - keeping track of
chunks of memory.
> Binary trees useful for searches?
it's useful for searches if the "is A less than B" comparison is a
useful property of the data you are representing. If not, it isn't
sing LaTeX.
That's a common pattern for matplotlib which aims to create
"publication quality figures" using vector graphics.
If you actually wanted to create an interactive piece of software for
other people to use on their computers then that's very different.
--
Oscar
_____
r/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
trees
What other trees are their other than hierarchical tree (file systems)
Link lists I would guess be useful in an index for a database?
Binary trees useful for searches?
Sean
___
Tutor maillist - Tutor@python.org
To unsubscribe or change
because I am learning. I am pushing myself
beyond my normal level of skills. Playing in the dark as I say. LOL
Sean
-Original Message-
From: Tutor On Behalf Of
Alan Gauld via Tutor
Sent: Wednesday, 26 June 2019 2:48 AM
To: tutor@python.org
Subject: Re: [Tutor] tree or link-list questions
iples will be similar but the practice
very different.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
_____
On 26/06/19 4:56 AM, Alan Gauld via Tutor wrote:
On 25/06/2019 15:52, Sinardy Xing wrote:
My question is, how currently all of this great technology glue together
and as a final product for the enduser. Because I cant imagine that we
install Anaconda Jupyter Notebook at frontend
l to 'it worked'
and that will be seen in Part 1 code as nice2.myGlobal.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
flickr.com/photos/alangauldphotos
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription optio
rt3 stored as nice2
myGlobal = "hello"
def changeGlobal():
global myGlobal
print("first value = ", nice.myGlobal)
myGlobal="it worked"
print("in changeGlobal2 =", myGlobal)
#changeGlobal()
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
t.savefig('foo.png')
>
> savefig looks at the file extension in determining what to output.
>
> Without a specific question, I'm not sure what else we can say...
>
>
> ___
> Tutor maillist -
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
w.flickr.com/photos/alangauldphotos
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
not sure what else we can say...
_______
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
hem.
Bob Gailer
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
I just wanted to know all about map() function in python.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
,
will that be possible all these done automatically and dynamically via an
apps ?
Thanks
Kind regards
Sinardy
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Minor nit-picks...
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
_______
Tutor maillist - Tutor@pytho
d a pretty nice
job on comprehensions, and I had saved the link, again it's down to
personal taste but take a gander at this to see if it makes sense:
https://treyhunner.com/2015/12/python-list-comprehensions-now-in-color/
___
Tutor maillist - Tut
il"?
Certainly I'm a believer in 'make it work before you make it better'.
So, (after all that!) what are we really achieving here? With such
quantities, is it critical to 'save time'? If so, is this part of the
code really the greatest time-sink?
(and we're back to the 'readability' consideration, pr
what are we really achieving here? With such
quantities, is it critical to 'save time'? If so, is this part of the
code really the greatest time-sink?
(and we're back to the 'readability' consideration, previously mentioned)
Thanks, for the provocation into answering this long-held question -
takes some time. So depending on circumstances you may see
insignificant or significant performance differences.
But, again -
Rule number one: only optimize when there is a proven speed bottleneck
___
Tutor maillist - Tutor@python.org
To unsubscribe
ge, that is if you really
want to do something, you can, so the type hints are not enforced at
runtime. Since it's not always the case that doing something possible
is a good idea, the type hints are there to make it easier to detect issues.
Your annotation looks funky, by the way, I'd expect to
201 - 300 of 74745 matches
Mail list logo