The Python standard library module datetime seems to be what you want.
It has objects representing date/times, and deltatimes (i.e.,
durations). These can be timezone aware or not as you wish.
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
On 3/27/23 6:00 AM
of -=.
Isn't it unpythonic to be able to make a mistake like that?
Regards,
Morten
These all mean the same thing, but I don't see a good way to designate
the second or third as an error.
x = -5
x=-5
x =- 5
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
--
https
Gary Davenport added the comment:
Just an update on this issue. I did make 2 packages available on pypi.org:
https://pypi.org/project/flowframe/
and
https://pypi.org/project/tkinterflow/
Thank you very much for your help.
--
resolution: -> works for me
stage: -> re
Gary Davenport added the comment:
Thank you so much for the kind words and help in giving me some direction with
these projects. I am relatively new to Python, object oriented programming and
open source collaboration.
I think the 3rd party module probably makes the most sense, because
New submission from Gary Davenport :
Hi there. I love Python and Tkinter. I know that there are geometry managers
pack, place, and grid. I think there should be a flow type management
available, like what is done in Java or html/css. This is more important as
responsive GUI design
ively is there an RE 'match' function that would test if
linux-r...@vger.kernel.org matches linux-raid.vger.kernel.org? I don't
really care if the '.' are all regarded as wild cards, the match will
be accurate enough.
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technolo
Gary Litvin added the comment:
I noticed it in IDLE 3.8. I installed 3.8 because it is a fairly
recent release described as "stable." Thanks to everyone for considering this.
At 03:41 AM 2/7/2021, you wrote:
>Dennis Sweeney added the comment:
>
>I think the strangeness i
Gary Litvin added the comment:
Thank you for your responses. I understand the difference between ==
and "is" and the intentional change in 3.8. My question is about what
seems to be inconsistent treatment in x is 'a' and if a is 'a': ...
At 12:49 AM 2/7/2021, Raymond Hetti
New submission from Gary Litvin :
>>> x = 'a'
>>> x is 'a'
True
>>> if x is 'a':
print(x)
SyntaxError: "is" with a literal. Did you mean "=="?
How come?
--
messages: 386575
nosy: garylitvin
priority: normal
severity: normal
stat
% eachPay)
I am aiming for the result of 43.6, but somehow get the result of 44.44.
(meal cost: 200) (Tip: 9) (people: 5)
I seem to do the calculation below, but get different results each time.
Total * Percentage Amount / 100
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institut
New submission from Gary van der Merwe :
asyncio.CancelledError inheritance was changed in 3.8.
https://bugs.python.org/issue32528
https://github.com/python/cpython/commit/431b540bf79f0982559b1b0e420b1b085f667bb7
The documentation still instructs the user to perform a pattern needed before
2156 Koyukuk Drive
Fairbanks AK 99775-7320
Work: 907-474-5172
cell: 907-328-9145
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
gary*atlanta added the comment:
tested this loop:
for (i=0; i performance
___
Python tracker
<https://bugs.python.org/issue37118>
___
___
Python-bugs-list mailin
Change by gary*atlanta :
--
components: Interpreter Core
nosy: gary*atlanta
priority: normal
severity: normal
status: open
title: Why is GIL on 2.7 so much faster than 3.7
versions: Python 3.7
___
Python tracker
<https://bugs.python.org/issue37
still
available for download.
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
gary ruben added the comment:
I wanted to add a datapoint to this. I also experience this problem in Windows
but not with Google Drive File Stream. In my case it is also being triggered by
Jupyter, which was where Deniz first noticed it, but I was saving the notebook
to my Z: drive, which
earthgecko-skyline.readthedocs.io/en/latest/index.html
With the hope Skyline can make the universe a bit less anomalous.
Regards
Gary
--
https://mail.python.org/mailman/listinfo/python-announce-list
Support the Python Software Foundation:
http://www.python.org/psf/donations/
arefully stored in Grade.ID.
So now the real question is: What were you trying to accomplish with
the assignment? Tell us, and let's see if we can find a way to
accomplish yor goal without wrecking the internals of the Grade class.
Gary Herron
it has impact on all variables. Is this behavio
?
Sent from Mail for Windows 10
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
1)/(10**(count-1)))):
B12
B1=(B11,"-",B12,"M")
B1
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
not here to do your
homework for you, and you won't learn anything if we do. You make an
attempt at solving this, asking any specific Python related questions
you need help with, and you'll find this to be prompt, friendly, and
helpful group.
Gary Herron
--
Dr. Gary Herron
Professor
You appear to have a local file named keyword.py which is hiding a
python installation file of the same name.
Gary Herron
On 09/17/2018 01:06 AM, jupiter@gmail.com wrote:
I have following errors running on Ubuntu 18, any insight how to fix it? Thank
you.
Python 2.7.15rc1 (default
an input target weight, what does it mean
to connect them? Either none of that is important (as is the case in
this simple indentation error), so don't include such distractions, or
it does matter, so take the time to define those terms.
Gary Herron
On 09/13/2018 12:11 AM, christyso
d make a table. But its giving me zeros or
333. And to get 5digits after the zero i wanted to use "%.5f " %First.
Could you help me to finish this, and tell me what am I doing wrong?
Thank you
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895
table. But its giving me zeros or
333. And to get 5digits after the zero i wanted to use "%.5f " %First.
Could you help me to finish this, and tell me what am I doing wrong?
Thank you
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895
New submission from Gary Simpson :
I started with Anaconda3 (python3.64). When I add #include "python.h" to my C++
code, I get the visual studio 2012 compile error:
anaconda3\include\pyport.h(6): fatal error C1083: Cannot open include file:
'inttypes.h': No such file or di
ion -> https://earthgecko-skyline.readthedocs.io/en/latest/index.html
With the hope Skyline can make the universe a bit less anomalous.
Regards
Gary
--
https://mail.python.org/mailman/listinfo/python-announce-list
Support the Python Software Foundation:
http://www.python.o
ion -> https://earthgecko-skyline.readthedocs.io/en/latest/index.html
With the hope Skyline can make the universe a bit less anomalous.
Regards
Gary
--
https://mail.python.org/mailman/listinfo/python-announce-list
Support the Python Software Foundation:
http://www.python.o
cs.io/en/latest/index.html
With the hope Skyline can make the universe a bit less anomalous.
Regards
Gary
--
https://mail.python.org/mailman/listinfo/python-announce-list
Support the Python Software Foundation:
http://www.python.org/psf/donations/
ta, y_data,
p0=[2, 2])
print(params)
plt.figure(figsize=(6, 4))
plt.scatter(x_data, y_data, label='Data')
plt.plot(x_data, test_func(x_data, params[0], params[1]),
label='Fitted function')
plt.legend(loc='best')
plt.show()
--
Dr. Gary Herron
Professor o
"any + context" at line
18. The "any" was passed as an integer from line 43 and the "context"
was defined as a tuple at line 35. This concatenation works! how?
Best Regards,
Jach Fong
---
This email has been checked for viruses by Avast antivirus software
second columns alone for x
and y respectively.
I am confused as to how data[:10] gives the first 10 rows while data[:,0] gives
all rows
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
This is a well known feature of Python. It's a very common "gotcha" to
new Python programmers.
Google "Mutable default parameters in Python" for long list of
explanations and fixes.
In short, don't use a mutable object as a default parameter.
Gary Herron
On 05/03/2
rse.ArgumentParser()
>>> parser.add_argument('--foo', action='append')
>>> parser.parse_args('--foo 1 --foo 2'.split())
Namespace(foo=['1', '2'])
I hope that helps.
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mai
know what that means? The answer you might
have expected (i.e. 260) does not fit in the 0 ... 255 range of 8 bits,
and so the result has overflowed and "wrapped around" to produce 4.
Try this for a simpler example of the same:
>>> np.uint8(260)
4
Gary Herron
--
Dr. Ga
I actually get this to check?
If i use type(data) I also get None.
Cheers
Sayth
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
I have searched for a solution to this but have not found a suitable
example.
The attached code generates this error: Traceback (most recent call last):
File "calcsignal.py", line 7, in
siglevfromexist = 34.8 + existattn
TypeError: unsupported operand type(s) for +: 'float' and 'list'
e for help
in translating it into a Python program.
Gary Herron
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
.
Welcome to python-list. If you ask a Python question, it will probably
get answered. If you want someone to do your homework, it will probably
not happen.
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman
Gary van der Merwe added the comment:
Indeed. Thanks to whoever fixed this.
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bugs.pyt
ter of fact, and despite the snark, that is true. A quick count
finds 46,209 .py files on my computer, spread across the OS, installed
packages, and my own work. I would strongly resist anything that needs
that much re-installation and personal attention.
--
Dr. Gary Herron
Professor of Computer Scien
Gary E. Miller added the comment:
> The docs are clear that System Random uses os.urandom() for creating random
> numbers, that there is not state, that sequences aren't reproducible, and
> that seed method has no effect and is ignored.
Agreed, but not relevant. I have anecdo
Gary E. Miller added the comment:
Is there a better place to submit documentation problems to? After my
programming team spends a lot of valuable time figuring what the Python doc
failed to mention I would like this knowledge to be put to good use by others.
Paying it forward if you
Gary E. Miller added the comment:
> > why have an ignored parameter that is not plainly documented as ignored.
> Because it improves the substitutability of one RNG for another (i.e. the
> same reason that we even have a seed() method).
I understand why it the parameter it the
Gary E. Miller added the comment:
I would change:
"Accordingly, the seed() method has no effect and is ignored."
To:
"Accordingly, the optional seed parameter and the seed() method have no effect
and are ignored."
It was not obvious to me that the seed paramrter go
New submission from Gary E. Miller:
The man page for random.SystemRandom([seed]]) fails to mention that the
parameter 'seed' is never used. This should be prominent in the documentation.
I have found several cases where a seed was provided to SystemRandom().
https://docs.python.org/2.7
we see that cv2.rectangle does indeed
return None:
Python: cv.Rectangle(img, pt1, pt2, color, thickness=1,
lineType=8, shift=0) → None
So the first pass through your loop does indeed set im to None with the line
im = cv2.rectangle(im.copy(), (x,y), (x+w, y+h), (0,255,0), 2)
and the
.rectangle draws a rectangle, what does it
return? If it doesn't return anything, the line
im = cv2.rectangle(...)
is how im gets the value of None.
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
for what its worth.
Do you really need anything more complex than this?
>>> toRadians = math.pi/180.0
>>> math.sin(90*toRadians)
1.0
Perhaps I'm not understanding what you mean by "clunky", but this seems
pretty clean and simple to me.
Gary Herron
--
Dr. Gary
I have to go out for a while, so for DED processing two options from
my end:
1. Process as you all have been in the past for now. If you all do
this, the records that have not been mailed prior to the latest list
are contained in a MailManage Job name DED_master. If you chose to
process as in
, 6]
In this next example, there are two separate lists:
>>> list1 = [1,2,3]
>>> list2 = [1,2,3]
>>> list1 += [4,5,6]
>>> print(list1, list2)
[1, 2, 3, 4, 5, 6] [1, 2, 3]
Does that help?
Gary Herron
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
ight", "credits" or "license" for more information.
>>> 2 ** 3 ** 2
512
>>> 2 ** (3 ** 2)
512
>>> (2 ** 3) ** 2
64
>>>
Here's the relevant documentation page:
https://docs.python.org/3/reference/expressions.html
Look for "... except for
will be essentially the same as if all three methods were
defined in MainCLass.
Gary Herron
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418
My primary use case is when I create a "Model" class to reflect an entire SQL
database. I wa
Label(win, image=img).pack()
return img
saved_img = load_img(win)
...
Gary Herron
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
l
answer (that it's the constructor), and suggest ignoring the overly
pedantic (and confusing) response to the contrary.
--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
t__ method is the constructor for instances of a class. It
is not required, but the situations in which a constructor is not
needed are few and unusual.
If you don't know object-oriented-programming, then I'd suggest you put
that high on your list of things to learn. It's a valuable tool.
Gary Herr
: "b" is a map object (iterator), then list(b) is run
twice.
>>> a = [1,2,3]
>>> b = map(lambda e: e+1, a)
>>> b
>>> list(b)
[2, 3, 4]
>>> list(b)
[]
I hope that helps.
Gary Herron
--
Dr. Gary Herron
Professor of Computer Science
D
8, 10, 11, 13, 14, 16, 17, 19]
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
whoever
wrote it into converting it to Python3.
Or my guess is completely wrong and the code is buggy and won't run
until fixed. (Which brings up the questions: What is cppdep.py? Who
wrote it? How do you know that it runs?)
Gary Herron
ds.
...
>>> print(C(1,2))
C(a=1, b=2)
>>>
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
rder:
for datum in reversed(data):
... whatever with datum ...
which wastes no time actually reversing the list, but simply loops
through them back to front.
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://ma
:MM:DD. Is there a way to include this as a valid format?
Yes, there is a way to specify your own format. Search the datetime
documentation for
datetime.strptime(date_string, format)
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425
On 02/13/2016 12:27 PM, Tom P wrote:
On 02/13/2016 07:13 PM, Gary Herron wrote:
On 02/13/2016 09:58 AM, Tom P wrote:
I am writing a program that has to deal with various date/time formats
and convert these into timestamps. It looks as if
dateutil.parser.parse should be able to handle about any
dea to use eval like
this, and it's a *really* bad idea to use eval with user supplied
input. The user could inject *any* malicious code.
Instead, use the importlib module to programmatically import a module.
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of
o I remove the duplicate list.
Gary R.
--
https://mail.python.org/mailman/listinfo/python-list
New submission from Gary Fernie:
SpooledTemporaryFile does not fully satisfy the abstract for IOBase.
Namely, `seekable`, `readable`, and `writable` are missing.
This was discovered when seeking a SpooledTemporaryFile-backed lzma file.
You may quickly repro this:
`lzma.open(SpooledTemporaryFile
t, I'd guess.
Try:
import string
first then you should be able to access string.join without error.
Gary Herron
Thanks,
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
', 'c']
['aa', 'bb', 'cc']
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
) (without the colon) and
try again. If there is further trouble, ask another question, but
please cut and paste the actual and *exact* results into the email.
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman/listinfo/python-list
the bin, include and lib directories into the
project instead of the normal django setup.
django 1.8
Debian 8 (jessie) OS
python 3.4
Any help will be sincerely appreciated.
Gary R.
--
https://mail.python.org/mailman/listinfo/python-list
Laura,
Thanks for the pointer to PyXB, I think this will work for my purposes and it
appears to be Python 3.4 / Windows compatible.
Thank you to all who helped.
On Friday, October 9, 2015 at 1:14:32 PM UTC-5, Laura Creighton wrote:
> In a message of Fri, 09 Oct 2015 10:24:34 -0700, G
the trick? if not any pointers on what I can do to get it to go. Are
there any other xmi parsers or tools?
Thanks
Gary
Error output below --
>python setup.py install
running install
running bdist_egg
running egg_info
writing entry points to xmiparser.egg-info\entry_points.txt
writ
On 09/09/2015 01:45 PM, John Gordon wrote:
In <mailman.280.1441823265.8327.python-l...@python.org> Gary Roach
<gary719_li...@verizon.net> writes:
Traceback (most recent call last):
File "/root/mystuff/mystuff/ex39_test.py", line 6, in
hashmap.set(states, 'O
On 09/09/2015 01:45 PM, John Gordon wrote:
In <mailman.280.1441823265.8327.python-l...@python.org> Gary Roach
<gary719_li...@verizon.net> writes:
Traceback (most recent call last):
File "/root/mystuff/mystuff/ex39_test.py", line 6, in
hashmap.set(states, 'O
On 09/09/2015 01:45 PM, John Gordon wrote:
In <mailman.280.1441823265.8327.python-l...@python.org> Gary Roach
<gary719_li...@verizon.net> writes:
Traceback (most recent call last):
File "/root/mystuff/mystuff/ex39_test.py", line 6, in
hashmap.set(states, 'O
cket = get_bucket(aMap, key)
for i in xrange(len(bucket)):
k, v = bucket[i]
if key == k:
del bucket[i]
break
def list(aMap):
"""Prints out what's in the Map."""
for bucket in aMap:
if bucket:
for k, v in bucket:
print k, v
Very frustrating and probably a stupid error. Any help will be sincerely
appreciated.
Gary R.
--
https://mail.python.org/mailman/listinfo/python-list
and Xbase but haven't done anything since I retired.
Good luck
Gary R
--
https://mail.python.org/mailman/listinfo/python-list
On 07/30/2015 11:15 PM, dieter wrote:
Gary Roach gary719_li...@verizon.net writes:
Being new to Django and Python, I have two projects setup side by
side, each in it's own virtualenv wrapper.
The twr_project is running Django 1.7, python 2.7 and is set up to
duplicate the 'Tango With Rango
On 07/30/2015 11:15 PM, dieter wrote:
Gary Roach gary719_li...@verizon.net writes:
Being new to Django and Python, I have two projects setup side by
side, each in it's own virtualenv wrapper.
The twr_project is running Django 1.7, python 2.7 and is set up to
duplicate the 'Tango With Rango
) and home.html (Django 1.8) is the name changes.
I have inserted print statements in the url tree to try debugging this
but all the path information returned seems reasonable.
Is this a bug in Ninja-IDE, Django 1.8 or is it something else.
If you need more information, please let me know
Gary R
New submission from Gary Peck:
argparse.FileType should support a newline argument that corresponds to the
newline parameter to open(). In addition to more closely mirroring the open()
API, this is also needed to properly use argparse.FileType with csv.reader() or
csv.writer() (which require
On 07/22/2015 04:44 PM, Chris Angelico wrote:
On Thu, Jul 23, 2015 at 9:35 AM, Gary Roach gary719_li...@verizon.net wrote:
At this point, I'm confused about a few things. Does the postgresql server
and my archivedb reside globally or are they inside my archivedb virtual
environment. I think
On 07/16/2015 04:53 PM, Chris Angelico wrote:
On Fri, Jul 17, 2015 at 9:34 AM, Gary Roach gary719_li...@verizon.net wrote:
On 07/15/2015 11:25 AM, Chris Angelico wrote:
You should then be able to create a regular user, and grant
appropriate permissions:
postgres=# create user archives
On 07/16/2015 04:53 PM, Chris Angelico wrote:
On Fri, Jul 17, 2015 at 9:34 AM, Gary Roach gary719_li...@verizon.net wrote:
On 07/15/2015 11:25 AM, Chris Angelico wrote:
You should then be able to create a regular user, and grant
appropriate permissions:
postgres=# create user archives
On 07/18/2015 04:36 PM, Terry Reedy wrote:
I would like more viewpoints from 2.7 users.
I read that (incorrectly of course) and just had to ask:
How do you intend to extract a viewpoint from that last 7/10 of a user?
With apologies,
Gary Herron
--
Dr. Gary Herron
Department
On 07/15/2015 11:25 AM, Chris Angelico wrote:
On Thu, Jul 16, 2015 at 3:13 AM, Gary Roach gary719_li...@verizon.net wrote:
Every time I try to do a python manage.py migrate I get:
django.db.utils.OperationalError: FATAL: password
authentication failed for user postgres
FATAL: password
things up and need
some expert advise. This is my first time working with python / Django
and am really shaky. I do have another learning project (rango) using
SQLite that works fine.
Gary R
--
https://mail.python.org/mailman/listinfo/python-list
print(_)
123
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
.
person['name'] = 'kacey'
person['age'] = 18
people.append(person)
for person in people:
print( person['nome'] )
Typo here: 'name', not 'nome'.
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
https://mail.python.org/mailman
(a[1])
28409872
This produces two different view of the same underlying object.
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
On 06/05/2015 06:39 AM, Todd wrote:
On Fri, Jun 5, 2015 at 3:23 PM, Gary Herron
gary.her...@islandtraining.com
mailto:gary.her...@islandtraining.com wrote:
On 06/05/2015 06:11 AM, Paul Appleby wrote:
On Fri, 05 Jun 2015 14:55:11 +0200, Todd wrote:
Numpy arrays
inverse has to do with anything), but I won't waste my time doing
so. If you take the time to carefully explain what you want, then I'm
sure you will find plenty of people here who will take the time to
answer you.
Gary Herron
--
https://mail.python.org/mailman/listinfo/python-list
(proc(f),())
TypeError: first arg must be callable
You should probably also consider using the higher-level threading
module rather than the lower level thread module.
(Also consider using Python3 instead of Python2.)
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
DigiPen
and the curses module) are distributed with
Python, so you should already have them installed.
Gary Herron
Other suggestions seemed to be overkill and confused me to due to my
beginner level knowledge and the fact these suggestions have other, more
complicated elements to them.
I just want
and the curses module) are distributed with
Python, so you should already have them installed.
Gary Herron
Other suggestions seemed to be overkill and confused me to due to my
beginner level knowledge and the fact these suggestions have other, more
complicated elements to them.
I just want
if
the individual keys or values are not sortable.
There is also an implementation of a type of dictionary that remembers
the order in which the items are *inserted*. It's in the collections
module and called OrderedDict.
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
above). Then it will be defined, and calling
parlindrome('...')
will produce a result rather than an error.
Gary Herron
a
'1234_'
parlindrome(a)
Traceback (most recent call last):
File pyshell#126, line 1, in module
parlindrome(a)
NameError: name 'parlindrome' is not defined
.
Python2:
__builtins__.open = whatever
Python3:
import builtins
builtins.open = whatever
Of course doing so is like shooting yourself in the foot: Any
subsequent pain is your own fault and probably well deserved.
Gary Herron
Within a module, you can simply do:
open = MyFile
Also
On 05/26/2015 05:43 PM, richard_riehle wrote:
I realized that I mentioned earlier that I found a solution to my original
question, but that I never posted an example of the solution. So, here is a
simplified example for anyone who is interested.
def fArray(fselect, fparm = 1):
def
numeric calculations on a
computer,. As such, it does apply to Python which uses the underlying
hardware for floating point calculations.
Validity is another matter. Where did you find the quote?
Gary Herron
Any other thoughts? :D
My imagining:
def distance(A, B):
A B
1 - 100 of 1049 matches
Mail list logo