New submission from Michael Saah <mike.s...@gmail.com>:

A call to
time.strftime('%')
returns
'%'

A similar call to
datetime.utcfromtimestamp(int(time.time()).strftime('%')
raises
ValueError: strftime format ends with raw %

Similar inputs like '%D %' behave similarly.

I might take a crack at fixing this, but first I wanted to see what the 
official guidance is. Seems to me like similar error handling behavior between 
the functions  would be desirable.

----------
components: Library (Lib)
messages: 328443
nosy: mjsaah
priority: normal
severity: normal
status: open
title: Inconsistency between dangling '%' handling in time.strftime() and 
datetime.strftime()
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35066>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

  • ... Michael Saah
    • ... Stéphane Wirtel
    • ... Eric V. Smith
      • ... Michael Saah
    • ... Karthikeyan Singaravelan
      • ... Michael Saah
    • ... Eric V. Smith
    • ... Eric V. Smith
    • ... శ్రీనివాస్ రెడ్డి తాటిపర్తి
    • ... Karthikeyan Singaravelan
      • ... Michael Saah

Reply via email to