Inconsistent keyword arg naming between alias() and FromClause.alias()

Issue #2124 resolved
Former user created an issue

Where table is an instance of Table,

alias(table, alias = 'othername')

is equivalent to

table.alias(name = 'othername')

Why is the keyword argument called alias in the first case but name in the second?

I would propose that name is the more intuitive choice here and that the alias() function and Alias.__init__ should call it name instead of alias, with alias also accepted but deprecated.

I only tested this in SQLA .66, so I don't know if this has changed somehow already in .7

Comments (2)

  1. Log in to comment