Project

General

Profile

Actions

Feature #6375

closed

Python notation for literal Hash

Added by alexeymuranov (Alexey Muranov) almost 12 years ago. Updated almost 12 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:44743]

Description

Is there a reason not to use Python notation for literal Hash as an alternative to Ruby notation? I would like to be able to write either { 'a' => 'b', 'c' => 'd' } or { 'a' : 'b', 'c' : 'd' }, and either { :a => 'b' } or { :a: 'b' } .

I find { a: 'b' } to be a confusing alternative to { :a => 'b' }, and do not use it because of this (because it cannot be used if the key is not a symbol).

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0