Python Forum
Git clone all of a Github user's public repositories (download all repositories)
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Git clone all of a Github user's public repositories (download all repositories)
#23
No offense but the newer format method looks like garbage to me haha...

As far as readability goes... I don't like this (although I can see that it's powerful for formatting/aligning):

'some data: {2} {1} {0}'.format(1.4, 5, 'stringer')
I kinda like this one though:

site = '{w3}{0}{tld}'
>>> site.format('metulburr',w3='www.',tld='.com')
'www.metulburr.com'

Also I think that the older technique is very similar in many languages... definitely C and Go (both of which I use occasionally). Is there any real difference as far as performance goes? Or is just being used because it's easier to format? I think using % with column numbers is extremely easy to read, easy to use/format, and very similar across languages. Just my opinion though.

Also I think that if I showed two mildly complex print statements (one using the old style and one using the new style) to my PM on Monday (a non-programmer).... I'm pretty sure he's going to understand the old style based solely on intuition and third grade problem solving skills Big Grin
Reply


Messages In This Thread
RE: Git clone all of a Github user's public repositories (download all repositories) - by rootVIII - Jul-20-2019, 05:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pong clone with classes OhNoSegFaultAgain 1 3,934 May-11-2019, 07:44 PM
Last Post: keames

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020